Org.BouncyCastle.Crypto.Digests.Gost3411Digest.cpyShortToBytes C# (CSharp) Method

cpyShortToBytes() private static method

private static cpyShortToBytes ( short wS, byte S ) : void
wS short
S byte
return void
		private static void cpyShortToBytes(short[] wS, byte[] S)
		{
			for(int i=0; i<S.Length/2; i++)
			{
				S[i*2 + 1] = (byte)(wS[i] >> 8);
				S[i*2] = (byte)wS[i];
			}
		}

Usage Example

コード例 #1
0
 private void fw(byte[] input)
 {
     Gost3411Digest.cpyBytesToShort(input, this.wS);
     this.w_S[15] = (this.wS[0] ^ this.wS[1] ^ this.wS[2] ^ this.wS[3] ^ this.wS[12] ^ this.wS[15]);
     Array.Copy(this.wS, 1, this.w_S, 0, 15);
     Gost3411Digest.cpyShortToBytes(this.w_S, input);
 }