# Cfusion_encrypt()

Encrypts the given string, alias for function call encrypt(string,key,"cfmx_compat","hex")

```
Cfusion_encrypt( string=string, key=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| string | string | Yes | string to encrypt |  |
| key | string | Yes | key to use for encryption |  |

# Examples

```cfml
key = "T5JalcfiANtOA+3V+02Ccw==";
string = "Lucee Association Switzerland (LAS)";

dump(Cfusion_encrypt(string, key)); // 7280919F93DB7E6FA8568C1AF2BBA599BD1E85AC5FB961F049908E9196DD16DBAB8CD6
```







# See Also

[Cfusion_decrypt()](cfusion_decrypt.md)