PHP how to encode binary data to base 64

后端 未结 2 788
失恋的感觉
失恋的感觉 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:15

    Just do:

    base64_encode($signature);
    

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

提交回复
热议问题