exports

### Hierarchy

- KeyStore
  - MutableKeyStore

### Implemented by

- MutablePgpKeyStore

## Index

### 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

## Methods

### clearKeysInKeyring

- clearKeysInKeyring(): void

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

  Remove all keys from the keyring.

  #### Returns void

### getEncryptKeys

- getEncryptKeys(): any[]

- Overrides KeyStore.getEncryptKeys

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

  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

- Overrides KeyStore.getFingerprint

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

  Get the first private key's fingerprint.

  #### Returns string

  The first private key's fingerprint.

### getKeyId

- getKeyId(key: any): string

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

  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[]

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

  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

- Overrides KeyStore.getPrivateKey

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

  Get the first private key.

  #### Returns any

  The first private key.

### getPrivateKeyForId

- getPrivateKeyForId(keyId: string): any

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

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

  #### Parameters

  - ##### keyId: string

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

  #### Returns any

  The private key with that keyId.

### getPrivateKeyId

- getPrivateKeyId(): string

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

  Get the first private key's keyID.

  #### Returns string

  The first private key's keyId.

### getPrivateKeys

- getPrivateKeys(): any[]

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

  Get all private keys.

  #### Returns any[]

  An array of all private keys.

### getPublicKeyForId

- getPublicKeyForId(keyId: string): any

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

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

  #### Parameters

  - ##### keyId: string

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

  #### Returns any

  The public key with that keyId.

### getPublicKeyForSubkeyId

- getPublicKeyForSubkeyId(subkeyId: string): any

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

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

  #### Parameters

  - ##### subkeyId: string

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

  #### Returns any

  The public key with that subkeyId.

### getPublicKeys

- getPublicKeys(): any[]

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

  Get all the public keys.

  #### Returns any[]

  An array of public keys.

### getPublicKeysForAddress

- getPublicKeysForAddress(address: string): any[]

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

  Get public keys from the keyring using their address.

  #### Parameters

  - ##### address: string

    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[]

- Overrides KeyStore.getTrustedActiveKeys

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

  Get all the trusted active keys.

  #### Returns any[]

  An array of trusted active keys.

### getTrustedKeys

- getTrustedKeys(): any[]

- Overrides KeyStore.getTrustedKeys

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

  Get all the trusted keys.

  #### Returns any[]

  An array of trusted keys.

### importKeyPair

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

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

  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>

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

  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>

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

  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>

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

  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>

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

  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(): void

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

  Instantiate the keyring in the keystore.

  async

  #### Returns void

### removeKeysForId

- removeKeysForId(keyId: string): any[]

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

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

  #### Parameters

  - ##### keyId: string

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

  #### Returns any[]

  An array of the removed keys.

### removePublicKey

- removePublicKey(publicKey: any): any

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

  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: string): any

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

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

  #### Parameters

  - ##### keyId: string

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

  #### Returns any

  The removed public key.

### sign

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

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

  Sign message using private key.

  async

  #### Parameters

  - ##### plainText: string

    The message to be signed.

  #### Returns Promise<any>

  The generated signature.

Generated using TypeDoc