v2_5_5 - Show latest stable - 0 notes - Class: Cipher
auth_tag(p1 = v1) public

Gets the authentication tag generated by Authenticated Encryption Cipher modes (GCM for example). This tag may be stored along with the ciphertext, then set on the decryption cipher to authenticate the contents of the ciphertext against changes. If the optional integer parameter tag_len is given, the returned tag will be tag_len bytes long. If the parameter is omitted, the default length of 16 bytes or the length previously set by #auth_tag_len= will be used. For maximum security, the longest possible should be chosen.

The tag may only be retrieved after calling Cipher#final.

Show source
Register or log in to add new notes.