Class: Ccrypto::PrivateKey
- Inherits:
-
Object
- Object
- Ccrypto::PrivateKey
- Defined in:
- lib/ccrypto/private_key.rb
Direct Known Subclasses
CrystalDilithiumPrivateKey, CrystalKyberPrivateKey, ECCPrivateKey, ED25519PrivateKey, RSAPrivateKey, X25519PrivateKey
Instance Attribute Summary collapse
-
#native_privKey ⇒ Object
Returns the value of attribute native_privKey.
Instance Method Summary collapse
-
#initialize(privKey) ⇒ PrivateKey
constructor
A new instance of PrivateKey.
- #method_missing(mtd, *args, &block) ⇒ Object
- #native ⇒ Object
- #respond_to_missing?(mtd, *args, &block) ⇒ Boolean
Constructor Details
#initialize(privKey) ⇒ PrivateKey
Returns a new instance of PrivateKey.
6 7 8 |
# File 'lib/ccrypto/private_key.rb', line 6 def initialize(privKey) @native_privKey = privKey end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mtd, *args, &block) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ccrypto/private_key.rb', line 10 def method_missing(mtd, *args, &block) if @native_privKey.nil? super else @native_privKey.send(mtd, *args, &block) end end |
Instance Attribute Details
#native_privKey ⇒ Object
Returns the value of attribute native_privKey.
5 6 7 |
# File 'lib/ccrypto/private_key.rb', line 5 def native_privKey @native_privKey end |
Instance Method Details
#native ⇒ Object
26 27 28 |
# File 'lib/ccrypto/private_key.rb', line 26 def native @native_privKey end |
#respond_to_missing?(mtd, *args, &block) ⇒ Boolean
18 19 20 21 22 23 24 |
# File 'lib/ccrypto/private_key.rb', line 18 def respond_to_missing?(mtd, *args, &block) if @native_privKey.nil? false else @native_privKey.respond_to?(mtd) end end |