---
title: Encryption
project: Total.js V4
version: 0.0.99
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/total-js-v4/0-0-99/guides/encryption/
updated: 2026-11-16T15:41:05.817Z
---

# Encryption

> Encrypt values with ENCRYPT() and DECRYPT(), bind them to the browser of a request with ENCRYPTREQ() and DECRYPTREQ(), and set the secret.

`ENCRYPT(value, key)` and `DECRYPT(value, key)` encrypt any value with `CONF.secret` and your key. Objects are serialized to JSON, and `DECRYPT()` parses JSON by default; pass `false` as the third argument to get the plain string back.
