crypto shortcuts
2.0.0Shorthand functions for common cryptography tasks such as hashing, encrypting, and encoding.
Table of Contents
About Crypto Shortcuts
This is a small wrapper library around ironclad and cl-base64 to provide quick and easy access to frequently used cryptography functionality like hashing, encoding and encrypting.
How To
(cryptos:from-base64 (cryptos:to-base64 "CLがすごいです。"))
(cryptos:decrypt (cryptos:encrypt "Lispy Secrets, oooOOooo" "1234567890123456") "1234567890123456")
(cryptos:pbkdf2-hash "My passwords have never been this secure, whoa nelly!" "salty snacks")
(cryptos:simple-hash "I guess not everyone can afford PBKDF2." "crisps")
(cryptos:md5 "MD5 hashes are weak, but still sometimes useful.")
(cryptos:sha512 "If you don't need hash iterations or salts like simple-hash provides, this will do too.")
(cryptos:totp-uri "Someone")
(cryptos:totp "some secret key for the totp")
System Information
Definition Index
-
CRYPTO-SHORTCUTS
- ORG.SHIRAKUMO.CRYPTO-SHORTCUTS
- CRYPTOS
No documentation provided.-
EXTERNAL FUNCTION ADLER32
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a ADLER32-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2/160
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2/160-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2S
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2S-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2S/128
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2S/128-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2S/160
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2S/160-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION BLAKE2S/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a BLAKE2S/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION CHECK-RFC-2307-HASH
- PASSWORD
- HASH
Returns T if the PASSWORD matches the HASH encoded in the scheme defined in RFC2307. See RFC-2307-HASH
-
EXTERNAL FUNCTION CRC24
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a CRC24-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION CRC32
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a CRC32-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION CRC32C
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a CRC32C-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION DECODE-TOTP-URI
- URI
Decodes a TOTP parameter URI Returns a list of the same argument list structure as TOTP-URI. This URL is according to Google's Authenticator scheme as described in https://github.com/google/google-authenticator/wiki/Key-Uri-Format See TOTP-URI
-
EXTERNAL FUNCTION FIND-DIGEST
- NAME
No documentation provided. -
EXTERNAL FUNCTION GROESTL
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a GROESTL-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION GROESTL/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a GROESTL/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION GROESTL/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a GROESTL/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION GROESTL/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a GROESTL/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION JH
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a JH-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION JH/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a JH/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION JH/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a JH/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION JH/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a JH/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KECCAK
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KECCAK-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KECCAK/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KECCAK/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KECCAK/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KECCAK/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KECCAK/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KECCAK/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KUPYNA
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KUPYNA-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION KUPYNA/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a KUPYNA/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION MD2
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a MD2-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION MD4
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a MD4-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION MD5
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a MD5-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION PBKDF2-HASH
- PASSWORD
- SALT
- &KEY
- DIGEST
- ITERATIONS
- TO
Hasehs PASSWORD with SALT using the PBKDF2 method and the provided DIGEST, repeating the process ITERATION times. The returned hash is encoded using the method specified in TO. The default DIGEST is SHA512, the iteration is 1000, and TO is HEX. Four values are returned: hash, salt (as a string), digest, and iterations. See TO.
-
EXTERNAL FUNCTION PBKDF2-KEY
- PASSWORD
- SALT
- &REST
- ARGS
- &KEY
- DIGEST
- ITERATIONS
Hashes PASSWORD with SALT using the PBKDF2 method and the provided DIGEST, repeating the process ITERATION times. The default DIGEST is SHA512, and the iteration is 1000. Four values are returned: hash as an octet-vector, salt (as a string), digest, and iterations. LEGACY. Use PBKDF2-HASH instead.
-
EXTERNAL FUNCTION RFC-2307-HASH
- PASSWORD
- &KEY
- METHOD
- SALT
- ITERATIONS
Hashes PASSWORD with METHOD according to the scheme defined in RFC2307. The returned hash will be a string of the format: {method}base64hash If SALT is passed, or the method is a salted one (sDIGEST), then the salt is returned as a secondary value and included in the hash. The hash is thus computed as follows, where no salt is an empty salt sequence. base64(digest(password+salt)+salt) An extension is provided to the standard, wherein extra parameters can be supplied to the hashing mechanism via commas after the method name. For most hashes this is just the iteration count, which is omitted if the count is 1. For PBKDF2, this also includes the actual digest method used. See CHECK-RFC-2307-HASH
-
EXTERNAL FUNCTION RIPEMD-128
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a RIPEMD-128-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION RIPEMD-160
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a RIPEMD-160-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA1
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA1-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA3
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA3-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA3/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA3/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA3/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA3/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA3/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA3/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHA512
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHA512-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHAKE128
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHAKE128-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SHAKE256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SHAKE256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SIMPLE-HASH
- PASSWORD
- SALT
- &KEY
- DIGEST
- ITERATIONS
- TO
Hashes PASSWORD with SALT using DIGEST as the digest-method and repeats the hashing ITERATIONS times. The returned hash is encoded using the method specified in TO. The default DIGEST is SHA512, the iteration is 1000, and TO is HEX. Four values are returned: hash, salt (as a string), digest, and iterations. See TO.
-
EXTERNAL FUNCTION SKEIN1024
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN1024-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN1024/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN1024/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN1024/512
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN1024/512-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN256/128
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN256/128-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN256/160
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN256/160-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN256/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN256/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512/128
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512/128-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512/160
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512/160-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512/224
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512/224-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SKEIN512/384
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SKEIN512/384-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION SM3
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a SM3-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION STREEBOG
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a STREEBOG-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION STREEBOG/256
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a STREEBOG/256-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION TIGER
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a TIGER-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION TOTP
- SECRET
- &KEY
- TIME
- DIGEST
- PERIOD
- DIGITS
Computes a Timed One Time Password for the given secret key. TIME should be the universal-time for which the OTP is computed. DIGEST should be the HMAC inner digest used, default being SHA1. PERIOD should be how long the OTP is valid for in seconds, default being 30. DIGITS should be the number of digits for the OTP, default being 6. Returns the OTP as an integer. If presenting to the user, you should pad the integer with zeroes to the required number of digits. The code is computed according to RFC6238 See TOTP-URI
-
EXTERNAL FUNCTION TOTP-URI
- ACCOUNT
- &KEY
- SECRET
- ISSUER
- DIGEST
- PERIOD
- DIGITS
Computes a URI to exchange the TOTP parameters with an external authenticator app. You will most likely want to encode the returned URI into a QR code to let the user scan it with a phone or other app more easily. The ACCOUNT should be some identifier for the user account this URI is for. Typically a username or email address. You should pass the ISSUER argument to identify the service that is using the TOTP. If no explicit SECRET is passed, one will be generated for you and is returned as the secondary value. You MUST store this secret somewhere and use it to compute the TOTP. You must pass the exact same parameters as you intend to use for the TOTP generation, as otherwise the authenticator application will not generate the same codes as you, and verification will fail. This URL is according to Google's Authenticator scheme as described in https://github.com/google/google-authenticator/wiki/Key-Uri-Format See TOTP
-
EXTERNAL FUNCTION TREE-HASH
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a TREE-HASH-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL FUNCTION WHIRLPOOL
- STRING
- &KEY
- TO
- ENCODE
- ITERATIONS
Turn a string into a WHIRLPOOL-hash. TO is the returned representation ENCODE is the encoding before hashing ITERATIONS is the number of times to hash See TO.
-
EXTERNAL GENERIC-FUNCTION CMAC
- TEXT
- KEY
- &KEY
- CIPHER
- MODE
- IV
- TO
- NORMALIZE-KEY
Generate a CMAC digest of TEXT using KEY and the provided CIPHER/MODE/IV. The returned digest is encoded by the format specified in TO. The default cipher is AES, default mode is ECB, and default TO is BASE64. Four values are returned: digest, key, cipher, mode, and IV. See TO See NORMALIZE-KEY
-
EXTERNAL GENERIC-FUNCTION CODE
- FROM
- TO
- VECTOR
Convenience function to de/encode in one pass. By default, FROM and TO can both be one of: :OCTETS :STRING :HEX :BASE64 :BASE32 If FROM is NIL, then TO is called with the remaining arguments.
-
EXTERNAL GENERIC-FUNCTION DECRYPT
- TEXT
- KEY
- &KEY
- CIPHER
- MODE
- IV
- FROM
- NORMALIZE-KEY
Decrypt TEXT with KEY using the provided CIPHER/MODE/IV. Depending on the mode, the key should be of length 16, 32, or 64. The passed text is decoded by the format specified in FROM. The default cipher is AES, default mode is ECB, and default TO is BASE64. Four values are returned: Decrypted text, key, cipher, mode, and IV. See CODE See NORMALIZE-KEY
-
EXTERNAL GENERIC-FUNCTION ENCRYPT
- TEXT
- KEY
- &KEY
- CIPHER
- MODE
- IV
- TO
- NORMALIZE-KEY
Encrypt TEXT with KEY using the provided CIPHER/MODE/IV. Depending on the mode, the key should be of length 16, 32, or 64. The returned encrypted vector is encoded by the format specified in TO. The default cipher is AES, default mode is ECB, and default TO is BASE64. Four values are returned: Encrypted&encoded text, key, cipher, mode, and IV. See TO See NORMALIZE-KEY
-
EXTERNAL GENERIC-FUNCTION FROM-BASE32
- VECTOR
- &OPTIONAL
- TO
Turns a base32-encoded vector into a vector encoded by TO. See TO.
-
EXTERNAL GENERIC-FUNCTION FROM-BASE64
- VECTOR
- &OPTIONAL
- TO
Turns a base64-encoded vector into a vector encoded by TO. See TO.
-
EXTERNAL GENERIC-FUNCTION FROM-HEX
- HEX-STRING
Turn the hex-string into an octet-vector.
-
EXTERNAL GENERIC-FUNCTION GET-CIPHER
- KEY
- &KEY
- CIPHER
- MODE
- IV
Return the corresponding cipher with KEY using MODE and potentially the initialization-vector IV.
-
EXTERNAL GENERIC-FUNCTION HMAC
- TEXT
- KEY
- &KEY
- DIGEST
- TO
Generate an HMAC digest of TEXT using KEY and the provided DIGEST method. The returned digest is encoded by the format specified in TO. The default digest is SHA512, and default TO is BASE64. Three values are returned: digest, key, and digest-type. See TO
-
EXTERNAL GENERIC-FUNCTION MAKE-SALT
- SALT
Create a salt from the given object. (eql T) -- A random salt INTEGER -- A salt of this size STRING -- Use this string as an octet-vector VECTOR -- Use this vector directly See TO-OCTETS
-
EXTERNAL GENERIC-FUNCTION NORMALIZE-KEY
- METHOD
- KEY
Normalizes the KEY to an octet-vector using METHOD. By default, method can be one of: :HASH -- Hash it by sha256 :FIT -- Truncate or pad it out before turning into octets. NIL -- Just turn it into an octet-vector.
-
EXTERNAL GENERIC-FUNCTION TO
- THING
- VECTOR
-
EXTERNAL GENERIC-FUNCTION TO-BASE32
- SEQUENCE
Turns a vector into a base32-encoded string.
-
EXTERNAL GENERIC-FUNCTION TO-BASE64
- SEQUENCE
Turns a vector into a base64-encoded string.
-
EXTERNAL GENERIC-FUNCTION TO-HEX
- VECTOR
Turn VECTOR into a hex-string.
-
EXTERNAL GENERIC-FUNCTION TO-OCTETS
- STRING
- &OPTIONAL
- FORMAT
Turns STRING into a FORMAT (default UTF-8) encoded octet-vector.
-
EXTERNAL GENERIC-FUNCTION TO-STRING
- OCTETS
- &OPTIONAL
- FORMAT
Turns OCTETS from FORMAT (default UTF-8) encoding into a string.