Back

encrypt (clj)

(source)

function

(encrypt input key iv) (encrypt input key iv {:keys [algorithm alg], :or {alg :aes128-cbc-hmac-sha256}, :as options})
Encrypt arbitrary length data using one of the supported encryption scheme. The default encryption scheme is: `:aes128-cbc-hmac-sha256`. Example: `(encrypt "hello world" mykey myiv)` You can specify an other encryption scheme passing an additional parameter. Example: `(encrypt "hello world" mykey myiv {:alg :aes128-cbc-hmac-sha512})` See the documentation for know the complete list of supported encryption schemes. The input, key and iv parameters should be of any type that can be coerced to byte array.

Examples