PHP how to encode binary data to base 64

后端 未结 2 786
失恋的感觉
失恋的感觉 2021-01-13 01:11

I am using PHP openssl_sign to create a digital signature using the tutorial here. How can i convert $signature (which contains binary data) to Base64.

相关标签:
2条回答
  • 2021-01-13 02:00

    You can convert binary to base64 using base64_encode.

    0 讨论(0)
  • 2021-01-13 02:15

    Just do:

    base64_encode($signature);
    

    Read more here: http://php.net/manual/en/function.base64-encode.php

    0 讨论(0)
提交回复
热议问题