Class: Toybox.Cryptography.KeyPair
- Inherits:
-
Toybox.Lang.Object
Overview
A public and private key pair.
See Also:
Instance Method Summary collapse
-
getPrivateKey() as Cryptography.Key
Get the private key.
-
getPublicKey() as Cryptography.Key
Get the public key.
- initialize(options as { :algorithm as Cryptography.KeyPairAlgorithm, :privateKey as Lang.ByteArray })
Instance Method Details
getPrivateKey() as Cryptography.Key
Get the private key.
getPublicKey() as Cryptography.Key
Get the public key.
initialize(options as { :algorithm as Cryptography.KeyPairAlgorithm, :privateKey as Lang.ByteArray })
Constructor
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.
Note:
privateKey is expected to be in little-endian byte order.