I have the following PHP code, which I need to get working in Flex 4.0:
$mac = base64_encode(hash_hmac('sha256', $message, $secret, true));
If the last element is a true the hash_hmac
is outputted as raw binary data, if it is false outputs lowercase hexits.
I have the following code written in Flex:
encryptedString = HMAC.hash(tempString,message,algorithm);
However, it outputs it as lowercase hexit. I can not find out how to convert the Flex output to binary data to match the PHP.
Does anyone know?