K Kerbeross Member Licensed User Longtime User Dec 8, 2017 #1 Hi, sorry for my bad English. I need to port this php line to B4A: PHP: $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $secret_key, true)); hash_hmac function generate a keyed hash value using the HMAC method. With the last parameter to true returns raw binary data. base64_encode function Encodes data with MIME base64. Can someone help me please?
Hi, sorry for my bad English. I need to port this php line to B4A: PHP: $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $secret_key, true)); hash_hmac function generate a keyed hash value using the HMAC method. With the last parameter to true returns raw binary data. base64_encode function Encodes data with MIME base64. Can someone help me please?
KMatle Expert Licensed User Longtime User Dec 9, 2017 #2 I'm not sure what you need here. Usually you e.g. hash a pw, encode it to Base64, store it and compare that Base64 string later on the server side. It's not an encryption, so as you compare 2 Base64 strings, everything should be fine. Are you getting errors from the Base64 encoding? Upvote 0
I'm not sure what you need here. Usually you e.g. hash a pw, encode it to Base64, store it and compare that Base64 string later on the server side. It's not an encryption, so as you compare 2 Base64 strings, everything should be fine. Are you getting errors from the Base64 encoding?
K Kerbeross Member Licensed User Longtime User Dec 9, 2017 #3 I do not need to verify passwords, is a signature required by the Amazon Product Advertising APIs. However I used this code module to get what I need: https://www.b4x.com/android/forum/t...r-b4x-works-on-b4a-b4i-b4j.81272/#post-550129 Upvote 0
I do not need to verify passwords, is a signature required by the Amazon Product Advertising APIs. However I used this code module to get what I need: https://www.b4x.com/android/forum/t...r-b4x-works-on-b4a-b4i-b4j.81272/#post-550129