---
title: "cipheriv encrypt · RUAL Documentation"
description: "Encrypts the given file using a specific algorithm and key for secure storage"
canonical: https://docs.rual.nl/block-types/files/file_cipher_encrypt
language: en
---

# cipheriv encrypt

This block is part of the [`files`](https://docs.rual.nl/block-types/files) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

Encrypts the given file using a specific algorithm and key for secure storage

- flow `flow`

- algorithm required `value` The algorithm to use

Default `aes-192-cbc`

- key required `value` The key used to encrypt (mostly scrypt output)

- file required `file` The file to be encrypted

- flow `flow`

```
true
```

- encrypted `file`

- auth tag `value`

- error `value` If an error occured, this pin is filled

A typical wiring for [cipheriv encrypt](https://docs.rual.nl/block-types/files/file_cipher_encrypt): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `algorithm` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `key` pin; [get file from assets](https://docs.rual.nl/block-types/files/file_from_assets) feeds the `file` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the cipheriv encrypt block: typical wiring for cipheriv encrypt.](https://docs.rual.nl/canvas-examples/file_cipher_encrypt.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
