class NetPGP::PublicKeyAlgorithm
Constants
- DSA
- ECDH
- ECDSA
- ELGAMAL
- FORMERLY_ELGAMAL
- NONE
- RSA
- RSA_ENCRYPT_ONLY
- RSA_SIGN_ONLY
Public Class Methods
from_native(alg)
click to toggle source
# File lib/netpgp/highlevel/constants.rb, line 16 def self.from_native(alg) raise if alg.class != Symbol LibNetPGP::PGP_PUBKEY_ALG_T[alg] end
to_native(alg)
click to toggle source
# File lib/netpgp/highlevel/constants.rb, line 21 def self.to_native(alg) # avoid a warning on newer versions of ruby if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0') raise if alg.class != Integer else raise if alg.class != Fixnum end LibNetPGP::PGP_PUBKEY_ALG_T[alg] end