Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EncryptionService describes a high level service for encryption/decryption of data.

Implemented algorithms for encryption/decryption include:

  • AES with PBKDF2 (Password-Based Key Derivation Function)
since

0.3.0

Hierarchy

  • EncryptionService

Index

Constructors

Methods

Constructors

constructor

Methods

Static decrypt

  • AES_PBKF2_decryption will decrypt privateKey with provided password

    Parameters

    • payload: EncryptedPayload

      the object containing the encrypted data.

    • password: string

      the password to decrypt the encrypted data

    Returns string

Static encrypt

  • The encrypt method will encrypt given data raw string with given password password.

    First we generate a random salt of 32 bytes, then we iterate 2000 times with PBKDF2 and encrypt with AES.

    Parameters

    • data: string
    • password: string

    Returns EncryptedPayload

Generated using TypeDoc