cipheriv encrypt
This block is part of the crypto group and was last modified in core v10.4.28.
cipheriv encrypt v10.4.28 encrypting data
- algorithm required
valueThe algorithm to use
- key required
valueThe key used to encrypt (mostly scrypt output)
- data required
valueThe data to be encrypted
- success
condition - encrypted
valuehex output
- auth tag
value - error
valueIf an error occured, this pin is filled
Encrypts data into a versioned, randomized, authenticated AES envelope. CBC uses a fresh IV plus encrypt-then-MAC; GCM uses a fresh nonce. The HEX output carries the IV/nonce and authentication data, so it can be passed directly to value_cipher_decrypt. key must be hex. auth_tag remains available for GCM compatibility and is nil for CBC. An unsupported algorithm or bad key sets success false with an error code and writes no output.
A typical wiring for cipheriv encrypt: value feeds the algorithm pin; value feeds the key pin; value feeds the data pin; the success out pin feeds branch.
Version history
Introduced in v10.4.28.
Back to
crypto Return to the main group to view all sub-groups Back to crypto Return to the group to view all blocks within this group 