doubingling4706 2018-01-23 10:25
浏览 46

包装行是否会影响PHP中的私钥/公钥?

I received a public key in the following format:

$publicKey = '-----BEGIN PUBLIC KEY
MIGfMA0GCSqGSIb3DQEBAQUAAASDF4QKBgQCMuZSztSi6iBLLxHquRomOXLW4WVtoovj8QqbUR8Bp1EiPsvN9Z9o4gCStacMAGWdvxH+V2vCZ7C66S+h2GTG45VBMfUeIfpc+Ta2593R10J34Vv+uKhPmTYNXASDH4howZMc0SK18ol7be63VtlwXGakNkLXsucGlTnfkWwGoQIDAQAB
-----END PUBLIC KEY-----';


$publicKey = '-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAAASDF4QKBgQCMuZSztSi6iBLLx
HquRomOXLW4WVtoovj8QqbUR8Bp1EiPsvN9Z9o4gCStacMAGWd
vxH+V2vCZ7C66S+h2GTG45VBMfUeIfpc+Ta2593R10J34Vv+uK
hPmTYNXASDH4howZMc0SK18ol7be63VtlwXGakNkLXsucGlTnf
kWwGoQIDAQAB
-----END PUBLIC KEY-----';

The difference is that the first one is not wrapped, otherwise, both strings are the same.

Both of them can do the encryption, but I am not sure if they are the same ones because of the line breaks.
I don't have the private key.

Does wrapping the key affect the value of the key?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作