Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing a storage container for private key data. Use this class if you need to load the keys stored with version 4.x of this library. For new code, use the PrivateKeyStorage instead.

deprecated

since version 5.0

Hierarchy

  • KeyStorage

Index

Constructors

Methods

Constructors

constructor

Methods

exists

  • exists(name: string): Promise<boolean>
  • Checks whether a private key data with the given name exist in persistent storage.

    Parameters

    • name: string

      Name to check.

    Returns Promise<boolean>

    • True if key data exist, otherwise false.

load

  • load(name: string): Promise<string | null>
  • Loads the private key data by the given name.

    Parameters

    • name: string

      Name of key data to load.

    Returns Promise<string | null>

    • Private key data as a string, or null if there is no data for the given name.

remove

  • remove(name: string): Promise<boolean>
  • Removes the private key data stored under the given name from persistent storage.

    Parameters

    • name: string

      Name of the key data to remove.

    Returns Promise<boolean>

    • True if the key has been removed, otherwise false.

save

  • save(name: string, data: string): Promise<void>
  • Persists the private key data under the given name.

    Parameters

    • name: string

      Name of the key data.

    • data: string

      The key data.

    Returns Promise<void>