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

# Cifratura

> Cifra i valori con ENCRYPT() e DECRYPT(), legali al browser di una richiesta con ENCRYPTREQ() e DECRYPTREQ() e imposta il secret.

`ENCRYPT(value, key)` e `DECRYPT(value, key)` cifrano qualsiasi valore con `CONF.secret` e la tua chiave. Gli oggetti vengono serializzati in JSON e `DECRYPT()` analizza il JSON per impostazione predefinita; passa `false` come terzo argomento per riottenere la stringa semplice.
