Хеш в Python генерируется таким образом.
Код: Выделить всё
hashed_data = hmac.new("ant", "bat", hashlib.sha1)
print hashed_data.hexdigest()
Код: Выделить всё
ASCIIEncoding encoder = new ASCIIEncoding();
Byte[] code = encoder.GetBytes("ant");
HMACSHA1 hmSha1 = new HMACSHA1(code);
Byte[] hashMe = encoder.GetBytes("bat");
Byte[] hmBytes = hmSha1.ComputeHash(hashMe);
Console.WriteLine(Convert.ToBase64String(hmBytes));
Должен ли я изменить порядок хеширования?
Спасибо,
Джон
Подробнее здесь: https://stackoverflow.com/questions/117 ... sharp-hmac