API Docs for: 0.2.0
Show:

lockbox.EncryptionCipher Class

The standard Lockbox encryption cipher.

Constructor

lockbox.EncryptionCipher

(
  • [crypto]
  • [ursa]
)

Parameters:

  • [crypto] Crypto optional

    The cryptography module to use.

  • [ursa] Ursa optional

    The Ursa module to use.

Item Index

Methods

Methods

encrypt

(
  • key
  • data
)
Buffer

Encrypt a data packet.

Parameters:

  • key ursa.Key

    The key to encrypt with.

  • data String | Buffer

    The data to encrypt.

Returns:

Buffer:

The encrypted data.