I have a working hashing task in VB.NET as follows:
Dim operand As Byte() = some bytes.... Dim ckCrypt As New Chilkat.Crypt2() ckCrypt.EncodingMode = "Base64" ckCrypt.HashAlgorithm = "sha1" Dim lNewDigest As String = ckCrypt.HashBytesENC(operand)
This works perfectly. The variable lNewDigest gets the Digest value as expected.
Now I have a need to have the same task in Android.
So my code is:
byte[] operand= some bytes.... CkCrypt2 ckCrypt = new CkCrypt2(); ckCrypt.put_EncodingMode( "Base64"); ckCrypt.put_HashAlgorithm ( "sha1"); String lNewDigest = ckCrypt.HashBytesENC(operand);
I saw some example on using CkByteData in between. But I am totally lost. I did not have any luck in appending plain bytes (operand) to CkByteData.