# crypto.digest.create

The digest of --text with --algorithm sha256 (default) or sha512, as lowercase hex

# crypto.digest.create

```
crypto.digest.create --text TEXT [--algorithm sha256|sha512] → digest
```

The digest of `--text` with `--algorithm sha256` (default) or `sha512`, as lowercase hex. Adds `digest: { algorithm, value }` and keeps the rest of the payload. An empty `--text` is refused. A digest is not a password hash: store passwords with [`crypto.password.hash`](/nodes/crypto/crypto.password.hash.md).

## Flags

- `--text` (required): The text to digest (its UTF-8 bytes).
- `--algorithm`: sha256 (default) or sha512.

## Examples

### A content fingerprint

```
| crypto.digest.create --text "{{ $trigger.body.content }}"
```

It answers:

```json
{
  "digest": {
    "algorithm": "sha256",
    "value": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
  }
}
```
