Method: NetPGP::PublicKey#to_native
- Defined in:
- lib/netpgp/highlevel/publickey.rb
#to_native(native) ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/netpgp/highlevel/publickey.rb', line 124 def to_native(native) native[:version] = @version native[:birthtime] = @creation_time.to_i if @version == 3 and @expiration_time native[:days_valid] = ((@expiration_time.to_i - @creation_time.to_i) / 86400).to_i else native[:duration] = (@expiration_time.to_i - @creation_time.to_i).to_i end native[:alg] = @public_key_algorithm NetPGP::mpis_to_native(native[:alg], @mpi, native) end |