exports

### Hierarchy

- MutablePgpKeyStore

### Implements

- MutableKeyStore

## Index

### Constructors

- constructor

### Methods

- clearKeysInKeyring
- getEncryptKeys
- getFingerprint
- getKeyId
- getKeysForId
- getPrivateKey
- getPrivateKeyForId
- getPrivateKeyId
- getPrivateKeys
- getPublicKeyForId
- getPublicKeyForSubkeyId
- getPublicKeys
- getPublicKeysForAddress
- getTrustedActiveKeys
- getTrustedKeys
- importKeyPair
- importPrivateKey
- importPublicKey
- isEncryptedPrivateKey
- isValidKey
- loadKeyring
- removeKeysForId
- removePublicKey
- removePublicKeyForId
- sign

## Constructors

### constructor

- new MutablePgpKeyStore(): MutablePgpKeyStore

- #### Returns MutablePgpKeyStore

## Methods

### clearKeysInKeyring

- clearKeysInKeyring(): void

- Implementation of MutableKeyStore.clearKeysInKeyring

  - Defined in src/app/_pgp/pgp-key-store.ts:167

  Remove all keys from the keyring.

  #### Returns void

### getEncryptKeys

- getEncryptKeys(): any[]

- Implementation of MutableKeyStore.getEncryptKeys

  - Defined in src/app/_pgp/pgp-key-store.ts:178

  Get all the encryption keys.

  remarks

    Current implementation doesn't include encryption keys. This is included to appease the implemented Keystore interface.

  #### Returns any[]

  An array of encryption keys.

### getFingerprint

- getFingerprint(): string

- Implementation of MutableKeyStore.getFingerprint

  - Defined in src/app/_pgp/pgp-key-store.ts:186

  Get the first private key's fingerprint.

  #### Returns string

  The first private key's fingerprint.

### getKeyId

- getKeyId(key: any): string

- Implementation of MutableKeyStore.getKeyId

  - Defined in src/app/_pgp/pgp-key-store.ts:201

  Get a key's keyId.

  #### Parameters

  - ##### key: any

    The key to fetch the keyId from.

  #### Returns string

  The key's keyId.

### getKeysForId

- getKeysForId(keyId: string): any[]

- Implementation of MutableKeyStore.getKeysForId

  - Defined in src/app/_pgp/pgp-key-store.ts:210

  Get keys from the keyring using their keyId.

  #### Parameters

  - ##### keyId: string

    The keyId of the keys to be fetched from the keyring.

  #### Returns any[]

  An array of the keys with that keyId.

### getPrivateKey

- getPrivateKey(): any

- Implementation of MutableKeyStore.getPrivateKey

  - Defined in src/app/_pgp/pgp-key-store.ts:218

  Get the first private key.

  #### Returns any

  The first private key.

### getPrivateKeyForId

- getPrivateKeyForId(keyId: any): any

- Implementation of MutableKeyStore.getPrivateKeyForId

  - Defined in src/app/_pgp/pgp-key-store.ts:227

  Get a private key from the keyring using it's keyId.

  #### Parameters

  - ##### keyId: any

    The keyId of the private key to be fetched from the keyring.

  #### Returns any

  The private key with that keyId.

### getPrivateKeyId

- getPrivateKeyId(): string

- Implementation of MutableKeyStore.getPrivateKeyId

  - Defined in src/app/_pgp/pgp-key-store.ts:235

  Get the first private key's keyID.

  #### Returns string

  The first private key's keyId.

### getPrivateKeys

- getPrivateKeys(): any[]

- Implementation of MutableKeyStore.getPrivateKeys

  - Defined in src/app/_pgp/pgp-key-store.ts:248

  Get all private keys.

  #### Returns any[]

  An array of all private keys.

### getPublicKeyForId

- getPublicKeyForId(keyId: any): any

- Implementation of MutableKeyStore.getPublicKeyForId

  - Defined in src/app/_pgp/pgp-key-store.ts:257

  Get a public key from the keyring using it's keyId.

  #### Parameters

  - ##### keyId: any

    The keyId of the public key to be fetched from the keyring.

  #### Returns any

  The public key with that keyId.

### getPublicKeyForSubkeyId

- getPublicKeyForSubkeyId(subkeyId: any): any

- Implementation of MutableKeyStore.getPublicKeyForSubkeyId

  - Defined in src/app/_pgp/pgp-key-store.ts:266

  Get a public key from the keyring using it's subkeyId.

  #### Parameters

  - ##### subkeyId: any

    The subkeyId of the public key to be fetched from the keyring.

  #### Returns any

  The public key with that subkeyId.

### getPublicKeys

- getPublicKeys(): any[]

- Implementation of MutableKeyStore.getPublicKeys

  - Defined in src/app/_pgp/pgp-key-store.ts:274

  Get all the public keys.

  #### Returns any[]

  An array of public keys.

### getPublicKeysForAddress

- getPublicKeysForAddress(address: any): any[]

- Implementation of MutableKeyStore.getPublicKeysForAddress

  - Defined in src/app/_pgp/pgp-key-store.ts:283

  Get public keys from the keyring using their address.

  #### Parameters

  - ##### address: any

    The address of the public keys to be fetched from the keyring.

  #### Returns any[]

  An array of the public keys with that address.

### getTrustedActiveKeys

- getTrustedActiveKeys(): any[]

- Implementation of MutableKeyStore.getTrustedActiveKeys

  - Defined in src/app/_pgp/pgp-key-store.ts:291

  Get all the trusted active keys.

  #### Returns any[]

  An array of trusted active keys.

### getTrustedKeys

- getTrustedKeys(): any[]

- Implementation of MutableKeyStore.getTrustedKeys

  - Defined in src/app/_pgp/pgp-key-store.ts:299

  Get all the trusted keys.

  #### Returns any[]

  An array of trusted keys.

### importKeyPair

- importKeyPair(publicKey: any, privateKey: any): Promise<void>

- Implementation of MutableKeyStore.importKeyPair

  - Defined in src/app/_pgp/pgp-key-store.ts:310

  Add a key pair to keyring.

  async
  throws

    Error

  #### Parameters

  - ##### publicKey: any

    The public key to be added to the keyring.

  - ##### privateKey: any

    The private key to be added to the keyring.

  #### Returns Promise<void>

### importPrivateKey

- importPrivateKey(privateKey: any): Promise<void>

- Implementation of MutableKeyStore.importPrivateKey

  - Defined in src/app/_pgp/pgp-key-store.ts:325

  Add private key to keyring.

  async
  throws

    Error

  #### Parameters

  - ##### privateKey: any

    The private key to be added to the keyring.

  #### Returns Promise<void>

### importPublicKey

- importPublicKey(publicKey: any): Promise<void>

- Implementation of MutableKeyStore.importPublicKey

  - Defined in src/app/_pgp/pgp-key-store.ts:339

  Add public key to keyring.

  async
  throws

    Error

  #### Parameters

  - ##### publicKey: any

    The public key to be added to the keyring.

  #### Returns Promise<void>

### isEncryptedPrivateKey

- isEncryptedPrivateKey(privateKey: any): Promise<boolean>

- Implementation of MutableKeyStore.isEncryptedPrivateKey

  - Defined in src/app/_pgp/pgp-key-store.ts:353

  Verify that a private key is encrypted.

  async

  #### Parameters

  - ##### privateKey: any

    The private key to verify.

  #### Returns Promise<boolean>

  true - If private key is encrypted.

### isValidKey

- isValidKey(key: any): Promise<boolean>

- Implementation of MutableKeyStore.isValidKey

  - Defined in src/app/_pgp/pgp-key-store.ts:369

  Test if the input is a valid key.

  async

  #### Parameters

  - ##### key: any

    The input to be validated.

  #### Returns Promise<boolean>

  true - If the input is a valid key.

### loadKeyring

- loadKeyring(): Promise<void>

- Implementation of MutableKeyStore.loadKeyring

  - Defined in src/app/_pgp/pgp-key-store.ts:379

  Instantiate the keyring in the keystore.

  async

  #### Returns Promise<void>

### removeKeysForId

- removeKeysForId(keyId: any): any[]

- Implementation of MutableKeyStore.removeKeysForId

  - Defined in src/app/_pgp/pgp-key-store.ts:389

  Remove a public key from the keyring using it's keyId.

  #### Parameters

  - ##### keyId: any

    The keyId of the keys to be removed from the keyring.

  #### Returns any[]

  An array of the removed keys.

### removePublicKey

- removePublicKey(publicKey: any): any

- Implementation of MutableKeyStore.removePublicKey

  - Defined in src/app/_pgp/pgp-key-store.ts:398

  Remove a public key from the keyring.

  #### Parameters

  - ##### publicKey: any

    The public key to be removed from the keyring.

  #### Returns any

  The removed public key.

### removePublicKeyForId

- removePublicKeyForId(keyId: any): any

- Implementation of MutableKeyStore.removePublicKeyForId

  - Defined in src/app/_pgp/pgp-key-store.ts:408

  Remove a public key from the keyring using it's keyId.

  #### Parameters

  - ##### keyId: any

    The keyId of the public key to be removed from the keyring.

  #### Returns any

  The removed public key.

### sign

- sign(plainText: any): Promise<any>

- Implementation of MutableKeyStore.sign

  - Defined in src/app/_pgp/pgp-key-store.ts:418

  Sign message using private key.

  async

  #### Parameters

  - ##### plainText: any

    The message to be signed.

  #### Returns Promise<any>

  The generated signature.

Generated using TypeDoc