Method: AsymmetricKey#initialize

Defined in:
lib/crypto/asymmetric_key.rb

#initialize(public_key = CLPublicKey.new([204, 238, 25, 54, 110, 175, 3, 72, 124, 184, 17, 151, 174, 142, 220, 177, 180, 127, 33, 76, 238, 0, 214, 89, 115, 128, 9, 107, 159, 132, 99, 193], 1), private_key = nil, signature_algorithm = nil) ⇒ AsymmetricKey

Returns a new instance of AsymmetricKey.

Parameters:

  • public_key (CLPublicKey) (defaults to: CLPublicKey.new([204, 238, 25, 54, 110, 175, 3, 72, 124, 184, 17, 151, 174, 142, 220, 177, 180, 127, 33, 76, 238, 0, 214, 89, 115, 128, 9, 107, 159, 132, 99, 193], 1))
  • private_key (Array) (defaults to: nil)
  • signature_algorithm (SignatureAlgorithm) (defaults to: nil)


22
23
24
25
26
27
28
# File 'lib/crypto/asymmetric_key.rb', line 22

def initialize(public_key = CLPublicKey.new([204, 238, 25, 54, 110, 175, 3, 72, 124, 184, 17, 151, 174, 142, 220, 
177, 180, 127, 33, 76, 238, 0, 214, 89, 115, 128, 9, 107, 159, 132, 99, 193], 1), private_key = nil, signature_algorithm = nil)
  @public_key = public_key
  @private_key = private_key
  @signature_algorithm = signature_algorithm
  @tag = @public_key.get_cl_public_key_tag
end