Please I need your help, Here is my encryption codes in PHP, it works fine but I don't know how to decrypt it in PHP. I need to get the actual value back. I have similar code in c# and I was able to get the same results. But I need to decrypt the value.
<?php
$DATA= 'james' ;
$KEY= 'moveme';
$hash = hash_hmac("sha256", utf8_encode($DATA), utf8_encode($KEY), false);
echo $hash;
?>
If you need to be able to encrypt and decrypt information, read up on the mcrypt functions.
hash_hmac is a hashing function, not an encryption function. You won't be able to decrypt it.
You should use the Mcrypt module instead.
The SHA-256 hash function is a hash function, it is not bijective. You cannot get your value back, neither in PHP nor in C#. Would be interesting to see this "working" C# code.