(aes-gcm-encrypt plaintext key nonce)
Encrypts plaintext using AES in GCM with key + nonce. Key must be 128, 192, or 256 bits long. Nonce must be 96 bits long. Authentication tag appended to ciphertext is 128 bits.
Encrypts plaintext using AES in GCM with key + nonce. Key must be 128, 192, or 256 bits long. Nonce must be 96 bits long. Authentication tag appended to ciphertext is 128 bits.
(decrypt ciphertext key)
Decrypt ciphertext using one of the provided keys.
ciphertext
parameter may be either a cryptopack map, or a JSON-encoded
compact cryptopack.
keys
parameter may be either a string password or byte array key, and may
either be a scalar or a collection.
Decrypt ciphertext using one of the provided keys. `ciphertext` parameter may be either a cryptopack map, or a JSON-encoded compact cryptopack. `keys` parameter may be either a string password or byte array key, and may either be a scalar or a collection.
(encrypt plaintext keys & flags)
Encrypts plaintext with a random data encryption key. DEK is protected with each of the provided key encryption keys and stored in slots in the output.
plaintext
parameter may be either a byte array, or a string,
which will be treated as UTF-8 bytes.
keys
parameter may be either a string password or byte array key, and may
either be a scalar or a collection.
Defaults to returning a self-describing map containing metadata and the ciphertext.
Add :json
to return a JSON string with compact field names.
Add :padded
to PKCS#7-pad plaintext to nearest 16 bytes to hide
exact plaintext length.
Encrypts plaintext with a random data encryption key. DEK is protected with each of the provided key encryption keys and stored in slots in the output. `plaintext` parameter may be either a byte array, or a string, which will be treated as UTF-8 bytes. `keys` parameter may be either a string password or byte array key, and may either be a scalar or a collection. Defaults to returning a self-describing map containing metadata and the ciphertext. Add `:json` to return a JSON string with compact field names. Add `:padded` to PKCS#7-pad plaintext to nearest 16 bytes to hide exact plaintext length.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close