0
我在学习OpenSSL
ruby模块。为什么OpenSSL :: PKey :: RSA密钥都是私有的和公共的?
下面显示的是pry会话,我使用RSA非对称公钥算法生成密钥。我又拨打了#private?
和#public?
实例方法:
[1] pry(main)> require 'openssl'
=> true
[2] pry(main)> alices_key = OpenSSL::PKey::RSA.new 2048
=> #<OpenSSL::PKey::RSA:0x007fc0751cb028>
[3] pry(main)> alices_key.public?
=> true
[4] pry(main)> alices_key.private?
=> true
- 为什么
#<OpenSSL::PKey::RSA:0x007fc0751cb028>
对象的公共和私人?