asp.net to php encoding -
i need php encryption method. turkey 3d bank payment module in code example given me in way encryption. me translate php code?
sha1 sha1 = new sha1cryptoserviceprovider(); byte[] nothashedbytes = system.text.encoding.ascii.getbytes(nothashedstr); byte[] hashedbyte = sha1.computehash(nothashedbytes); string hashedstr = system.convert.tobase64string(hashedbyte); return hashedstr;
i know nothing .net gathered in this page seems php equivalent just:
$hashedstr = base64_encode(sha1($nothashedstr, true));
you need encode raw binary format , not hexadecimal representation.
Comments
Post a Comment