API Docs for: 0.2.0
Show:

lockbox.Cipher Class

Defined in: src/Cipher.coffee:20

The standard Lockbox bi-directional cipher.

Constructor

lockbox.Cipher

(
  • [encryptionCipher]
  • [decryptionCipher]
)

Parameters:

Item Index

Methods

Methods

decrypt

(
  • key
  • data
)
Buffer

Decrypt a data packet.

Throws:

Parameters:

  • key ursa.Key

    The key to decrypt with.

  • data String | Buffer

    The data to decrypt.

Returns:

Buffer:

The decrypted data.

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.