Class: Ccrypto::Ruby::ED25519KeyBundle

Inherits:
Object
  • Object
show all
Includes:
ED25519KeyBundle, TR::CondUtils, TeLogger::TeLogHelper
Defined in:
lib/ccrypto/ruby/engines/ed25519_engine.rb

Instance Method Summary collapse

Constructor Details

#initialize(kp) ⇒ ED25519KeyBundle

Returns a new instance of ED25519KeyBundle.



21
22
23
# File 'lib/ccrypto/ruby/engines/ed25519_engine.rb', line 21

def initialize(kp)
  @nativeKeypair = kp
end

Instance Method Details

#private_keyObject



32
33
34
# File 'lib/ccrypto/ruby/engines/ed25519_engine.rb', line 32

def private_key
  ED25519PrivateKey.new(@nativeKeypair)
end

#public_keyObject



25
26
27
28
29
30
# File 'lib/ccrypto/ruby/engines/ed25519_engine.rb', line 25

def public_key
  if @pubKey.nil?
    @pubKey = ED25519PublicKey.new(@nativeKeypair.verify_key)
  end
  @pubKey
end