GOLF(2gg)
π GOLF(2gg) β the one and only π
okay bestie, welcome to GOLF(2gg), Development section, and today's main character is decrypt-data. buckle up, it's giving cryptography but make it cute β¨
β¨ NAME β¨
decrypt-data β (encryption) π
π¦ PURPOSE π¦
Decrypt data. that's it. that's the whole job. slay π
π§ SYNTAX π§
decrypt-data <data> to <result> \
[ input-length <input length> ] \
[ binary [ <binary> ] ] \
( password <password> \
[ salt <salt> [ salt-length <salt length> ] ] \
[ iterations <iterations> ] \
[ cipher <cipher algorithm> ] \
[ digest <digest algorithm> ]
[ cache ]
[ clear-cache <clear cache> ) \
[ init-vector <init vector> ]
lowkey a lot of clauses but like, each one has a purpose, i promise π«Ά
πΈ DESCRIPTION πΈ
so decrypt-data will decrypt <data> which must have been encrypted with encrypt-data, or with other software using the same algorithms and clauses as specified. no mixing and matching, bestie, that's not the vibe π
if the input-length clause is not used, then the number of bytes decrypted is the length of <data> (see string-length); but if input-length is specified, then exactly <input length> bytes are decrypted. periodt. π₯
the password used for decryption is the string <password> (in the password clause) and it must match the password used in encrypt-data. if the salt clause is used, then the string <salt> must match the salt used in encryption. if the init-vector clause is used, then the string <init vector> must match the IV (initialization vector) used in encryption. and if the iterations clause is used, then <iterations> must match the number used in encryption. matching = mandatory, iykyk π
the result of decryption lives in <result> (in the to clause). that's your output, your prize, your moment π
β οΈ if data was encrypted in binary mode (seeencrypt-data), you must decrypt it with the same, and if it wasn't, then you must not use it indecrypt-dataeither. the reason is obvious honestly β binary mode of encryption is encrypted data in its shortest form, and character mode (withoutbinary, or if<binary>evaluates to false) is the same data converted to a hexadecimal string β so decryption must first convert such data back to binary before decrypting. not me explaining hex-to-binary lore at 2am π
the cipher and digest algorithms (if specified as <cipher algorithm> and <digest algorithm> in the cipher and digest clauses respectively) must match what was used in encrypt-data. fr fr, no substitutions π
the cache clause is used to cache the result of key computation, so it is not computed each time decryption takes place π while clear-cache allows the key to be re-computed every time <clear cache> evaluates to boolean true. re-computation of a key, if used, must match the usage during encryption. for more on the cache and clear-cache clauses, as well as the safety of encrypting/decrypting, see "Caching key" and "Safety" in encrypt-data. go read it, bestie, it's important π«Ά
π EXAMPLES π
See encrypt-data. (yes really, that's where the examples are living, go visit them π¦)
π SEE ALSO π
- Encryption
decrypt-dataderive-keyencrypt-datahash-stringhmac-stringrandom-cryptorandom-string- See all documentation
and that's the whole page, bestie!! π this absolute icon of a manpage is brought to you by the $VERSION edition, dated $DATE, and yes, it's still filed under GOLF(2gg) because legends never leave their section πβ¨π
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms