I am trying to write the same encoding routine between a c# app and Basic4Android.
As hard as I try, I can't get the b4a routine to generate the same hash as the one for c#.
Can anyone help me write the b4a equivalent of (this is c# code btw):
The validation key I am using is the same on both platforms.
As hard as I try, I can't get the b4a routine to generate the same hash as the one for c#.
Can anyone help me write the b4a equivalent of (this is c# code btw):
B4X:
HMACSHA1 hash1 = new HMACSHA1();
hash1.Key = HexToByte(validationKey);
string encodedPassword = Convert.ToBase64String(hash1.ComputeHash(Encoding.Unicode.GetBytes(stringToHash)));
The validation key I am using is the same on both platforms.