Example #1
0
 protected override byte[] HashFinal()
 {
     byte[] B      = new byte[BLOCK_LENGTH];
     byte[] buffer = new byte[xBufOff];
     Buffer.BlockCopy(xBuf, 0, buffer, 0, buffer.Length);
     byte[] tmp = SM3Base.padding(buffer, cntBlock);
     for (int i = 0; i < tmp.Length; i += BLOCK_LENGTH)
     {
         Buffer.BlockCopy(tmp, i, B, 0, B.Length);
         doHash(B);
     }
     return(V);
 }
Example #2
0
 private void doHash(byte[] B)
 {
     byte[] tmp = SM3Base.CF(V, B);
     Buffer.BlockCopy(tmp, 0, V, 0, V.Length);
     cntBlock++;
 }