| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Encryption.SetGCMTag
Sets the GCM tag of the next decryption.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Encryption | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Encryption.SetGCMTag"; Data ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Data | The hext encoded tag value. | "F8A1217A19AACEF6EEA93B1D5319B5E4" |
Result
Returns OK or error.
Description
Sets the GCM tag of the next decryption.We clear this value when decrypting.
Examples
Encrypt with AES-256-GCM and set tag:
Let([
text = "Hello World";
IV = "0000000000000000";
key = "Just testing";
r = MBS( "Encryption.Cipher"; "encrypt"; "aes-256-gcm";
"Text"; key; "UTF-8";
"Text"; text; "UTF-8";
"Hex"; "";
"Hex"; IV; "");
tag = MBS("Encryption.GetGCMTag")
]; r & ¶ & tag)
Example result:
E96102C899900E1FE70A31
F8A1217A19AACEF6EEA93B1D5319B5E4
text = "Hello World";
IV = "0000000000000000";
key = "Just testing";
r = MBS( "Encryption.Cipher"; "encrypt"; "aes-256-gcm";
"Text"; key; "UTF-8";
"Text"; text; "UTF-8";
"Hex"; "";
"Hex"; IV; "");
tag = MBS("Encryption.GetGCMTag")
]; r & ¶ & tag)
Example result:
E96102C899900E1FE70A31
F8A1217A19AACEF6EEA93B1D5319B5E4
Decrypt something with AES-256-GCM and tag:
Let([
encrypted = "E96102C899900E1FE70A31";
tag = "F8A1217A19AACEF6EEA93B1D5319B5E4";
IV = "0000000000000000";
key = "Just testing";
tag = MBS("Encryption.SetGCMTag"; "F8A1217A19AACEF6EEA93B1D5319B5E4");
r = MBS( "Encryption.Cipher"; "decrypt"; "aes-256-gcm";
"Text"; key; "UTF-8";
"Hex"; encrypted; "";
"Text"; "UTF-8";
"Hex"; IV; "")
]; r)
Example result: Hello World
encrypted = "E96102C899900E1FE70A31";
tag = "F8A1217A19AACEF6EEA93B1D5319B5E4";
IV = "0000000000000000";
key = "Just testing";
tag = MBS("Encryption.SetGCMTag"; "F8A1217A19AACEF6EEA93B1D5319B5E4");
r = MBS( "Encryption.Cipher"; "decrypt"; "aes-256-gcm";
"Text"; key; "UTF-8";
"Hex"; encrypted; "";
"Text"; "UTF-8";
"Hex"; IV; "")
]; r)
Example result: Hello World
See also
Release notes
- Version 16.4
- Added Encryption.SetGCMTag and Encryption.GetGCMTag functions.
Blog Entries
This function is free to use.
Created 18th August 2026, last changed 18th August 2026
MarkDown version: EncryptionSetGCMTag.md