@@ -52,7 +52,7 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
5252 }
5353
5454 var hv = transformer . FinalizeHashValue ( ) ;
55- Array . Copy ( hv . Hash , intermediateHash . Buffer , hv . Hash . Length ) ;
55+ Array . Copy ( hv . AsByteArray ( ) , intermediateHash . Buffer , hv . Hash . Length ) ;
5656 }
5757
5858 if ( hash . Length <= intermediateHash . Buffer . Length )
@@ -73,7 +73,7 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
7373 {
7474 Array . Copy ( intermediateHash . Buffer , toHash . Buffer , intermediateHash . Buffer . Length ) ; // set toHash to be the previous hash
7575 var hv = HashFactory < IBlake2B , IBlake2BConfig > . Create ( blake2BConfig ) . ComputeHash ( toHash . Buffer ) ;
76- Array . Copy ( hv . Hash , intermediateHash . Buffer , hv . Hash . Length ) ;
76+ Array . Copy ( hv . AsByteArray ( ) , intermediateHash . Buffer , hv . Hash . Length ) ;
7777
7878 Array . Copy ( intermediateHash . Buffer , 0 , hash , pos , b2B2 ) ; // copy half hash result
7979 pos += b2B2 ;
@@ -92,7 +92,7 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
9292
9393 {
9494 var hv = HashFactory < IBlake2B , IBlake2BConfig > . Create ( blake2BConfig ) . ComputeHash ( toHash . Buffer ) ;
95- Array . Copy ( hv . Hash , intermediateHash . Buffer , hv . Hash . Length ) ;
95+ Array . Copy ( hv . AsByteArray ( ) , intermediateHash . Buffer , hv . Hash . Length ) ;
9696 }
9797 Array . Copy ( intermediateHash . Buffer , 0 , hash , pos , hash . Length - pos ) ; // copy the final bytes from the first part of the hash result
9898 }
@@ -101,3 +101,4 @@ private static void Blake2BLong(byte[] hash, byte[] inputBuffer, SecureArrayCall
101101 }
102102
103103}
104+
0 commit comments