Org.BouncyCastle.Crypto.Digests.WhirlpoolDigest.convertLongToByteArray C# (CSharp) Method

convertLongToByteArray() private static method

private static convertLongToByteArray ( long inputLong, byte outputArray, int offSet ) : void
inputLong long
outputArray byte
offSet int
return void
		private static void convertLongToByteArray(long inputLong, byte[] outputArray, int offSet)
		{
			for (int i = 0; i < 8; i++)
			{
				outputArray[offSet + i] = (byte)((inputLong >> (56 - (i * 8))) & 0xff);
			}
		}

Usage Example

コード例 #1
0
 public int DoFinal(byte[] output, int outOff)
 {
     this.finish();
     for (int i = 0; i < 8; i++)
     {
         WhirlpoolDigest.convertLongToByteArray(this._hash[i], output, outOff + i * 8);
     }
     this.Reset();
     return(this.GetDigestSize());
 }