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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -