Flex 4.0 HMAC.hash binary data
I am trying to replicate a function I have in php, in my flex code:
If PHP:
$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); In flex I am using the following imports:
import com.adobe.crypto.HMAC;
import com.adobe.crypto.SHA256;
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?
