Scieneer Common Lisp 1.3.9 online documentation

crypto:make-cipher name key &key encrypt decrypt[Generic Function]

Make and initialize a cipher given its name and the key material. The key material is generally a byte vector or a string but a specific cipher may require one or the other. The key material is used to initialize the cipher but is not stored and the caller may destructively modify it upon return. When encrypt is true a cipher capable of encryption is returned, and when decrypt is true a cipher capable of decryption is returned - by default a cipher capable of both is returned.

Methods are provided for the AES cipher. The :aes256, :aes196, and :aes128 ciphers accept a byte vector for the key of length 32, 24, and 16 bytes respectively. The :aes256-plain, :aes196-plain, and :aes128-plain ciphers accept a string for the key from which the key material is derived.