An interface describing cryptography engines. Implementations are used to encrypt payment requests.

Hierarchy

  • CryptoEngine

Methods

  • Encrypts a string using a provided public key.

    Parameters

    • payload: string

      The payload to encrypt.

    • keyId: string

      The identifier of the key that is used to encrypt sensitive data. Retrieved from the Worldline Connect Client API.

    • publicKey: string

      The public key that is used to encrypt the sensitive data with. Retrieved from the Worldline Connect Client API.

    Returns Promise<string>

    A promise that contains the encrypted payload.

  • Creates a random string each time it's called.

    Returns string