Class Mnemonic
Helper class to produce public and private key values from mnemonic word phrases.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class Mnemonic
Remarks
Warning: this class has not been hardened against external attacks, it keeps the root seed in memory.
Constructors
| Edit this page View SourceMnemonic(string[], string)
Constructor taking an array of mnemonic words and a passphrase.
Declaration
public Mnemonic(string[] words, string passphrase)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | words | An array of words that make up the mnemonic. |
| string | passphrase | Optional password (empty string or null is allowed for no password). |
Methods
| Edit this page View SourceGenerateKeyPair(KeyDerivationPath)
Computes the HD key pair for this Mnemonic.
Declaration
public (ReadOnlyMemory<byte> publicKey, ReadOnlyMemory<byte> privateKey) GenerateKeyPair(KeyDerivationPath path)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyDerivationPath | path | The key derivation path that should be used to generate the private and public key values. |
Returns
| Type | Description |
|---|---|
| (ReadOnlyMemory<byte> publicKey, ReadOnlyMemory<byte> privateKey) | DER Encoded public and private key values. |