Class: Toybox::Cryptography::KeyPair

Inherits:
Lang::Object show all

Overview

A public and private key pair.

Since:

  • 3.0.0

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initialize(options) ⇒ KeyPair

Returns a new instance of KeyPair.

A KeyPair can be initialized from a private key by passing a private key ByteArray from an initialized Key object into the :privateKey option of the initialize method for this class. If no private key is provided, then both a private and public key will be generated using the required :algorithm option.

Parameters:

Options Hash (options):

Raises:

Since:

  • 3.0.0


3776
3777
# File 'Monkeybrains.rb', line 3776

def initialize(options)
end

Instance Method Details

getPrivateKeyToybox::Cryptography::Key

Get the private key.

Returns:

Since:

  • 3.0.0


3781
3782
# File 'Monkeybrains.rb', line 3781

def getPrivateKey()
end

getPublicKeyToybox::Cryptography::Key

Get the public key.

Returns:

Since:

  • 3.0.0


3787
3788
# File 'Monkeybrains.rb', line 3787

def getPublicKey()
end