Class: KeyPair
Defined in: keys.ts:189
A matched public/secret key pair.
Accessors
algorithm
Get Signature
get algorithm():
string
Defined in: keys.ts:243
Returns
string
publicKey
Get Signature
get publicKey():
PublicKey
Defined in: keys.ts:234
The public key.
Returns
secretKey
Get Signature
get secretKey():
SecretKey
Defined in: keys.ts:239
The secret key. Freed together with the pair.
Returns
Methods
[dispose]()
[dispose]():
void
Defined in: keys.ts:256
Returns
void
free()
free():
void
Defined in: keys.ts:251
Frees the pair and any key objects obtained from it.
Returns
void
toCborBundle()
toCborBundle():
Uint8Array
Defined in: keys.ts:247
CBOR bundle of both keys (contains the secret).
Returns
Uint8Array
toString()
toString():
string
Defined in: keys.ts:259
Returns
string
fromCborBundle()
staticfromCborBundle(data):KeyPair
Defined in: keys.ts:200
Parses a quantum-safe-py KeyPair.to_cbor_bundle() blob.
Parameters
data
Uint8Array
Returns
KeyPair
fromKeys()
staticfromKeys(publicKey,secretKey):KeyPair
Defined in: keys.ts:209
Assembles a pair from separately held keys (for example a public key from one place and a secret key from another). The keys are copied; the caller still owns, and should free, the arguments.
Parameters
publicKey
secretKey
Returns
KeyPair
Throws
if the algorithms differ.