Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EncryptedPayload describes an encrypted payload with salt and ciphertext properties.

since

0.3.0

Hierarchy

  • EncryptedPayload

Index

Constructors

constructor

Properties

Readonly ciphertext

ciphertext: string

Readonly salt

salt: string

Methods

Static fromJSON

  • Parse a JSON representation of an encrypted payload into a EncryptedPayload instance.

    The provided JSON must contain fields 'ciphertext' and 'salt'.

    Parameters

    • json: string

    Returns EncryptedPayload

Static isDataEncrypted

  • isDataEncrypted(jsonObject: any): boolean
  • Checks if the data ojbect is encrypted

    Parameters

    • jsonObject: any

    Returns boolean

Static Private validateJson

  • validateJson(json: string): any
  • Validates given json string and returns json object

    throws

    {Error} If validation fails

    Parameters

    • json: string

    Returns any

    json object

Generated using TypeDoc