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jnw==xxxxxxxx@bu.edu
3 原理
与对称加密不同
两个密钥一次生成,然后将这两个密钥分开使用
如果加密用public,解密就用各自的private
如果加密用private,解密就用public
网友评论