2008-08-23, 01:16 PM
Hello,
in the function below $data and $key (private key) is passed and a hash will be returned as $hmac.
Just wanted to ask if there is any way to reverse the output of this
function (base64_encode($hmac)) using $key and get $data back? or this encoding method is one way? If this is possible to understand what is $data (using $key and $hmac), can someone write a function for me to reverse the function above? I appreciate it.
I know sha1 is one-way but it just does encrypt $key and not $data, so it doesn't matter that sha1 is used here. Is the original $data reversable or one way?
in the function below $data and $key (private key) is passed and a hash will be returned as $hmac.
Cod removed.
Just wanted to ask if there is any way to reverse the output of this
function (base64_encode($hmac)) using $key and get $data back? or this encoding method is one way? If this is possible to understand what is $data (using $key and $hmac), can someone write a function for me to reverse the function above? I appreciate it.
I know sha1 is one-way but it just does encrypt $key and not $data, so it doesn't matter that sha1 is used here. Is the original $data reversable or one way?