---
url: /flow/guide/scripting-reference/functions/encryption/rc4decryptkey.md
---

# RC4DecryptKey

## Declaration

`Function RC4DecryptKey( Input : string; aKey : string) : String`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := RC4DecryptKey(<Rc4Value>,'d5(f7329f&gksh!s''k8w0'); //value will be decrypted using the unique key
end;
```

## Description

Decrypts the RC4 value using the unique key provided. This key will be preprocessed for use with RC4. This should be used to decrypt a value encrypted with [RC4EncryptKey](/flow/guide/scripting-reference/functions/encryption/rc4encryptkey).
