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


4687
4688
# File 'Monkeybrains.rb', line 4687

def initialize(options)
end

Instance Method Details

getPrivateKeyToybox::Cryptography::Key

Get the private key.

Returns:

Since:

  • 3.0.0


4692
4693
# File 'Monkeybrains.rb', line 4692

def getPrivateKey()
end

getPublicKeyToybox::Cryptography::Key

Get the public key.

Returns:

Since:

  • 3.0.0


4698
4699
# File 'Monkeybrains.rb', line 4698

def getPublicKey()
end