struct

AesGcm::EncryptedData

Inherits Struct < Value < Object

Represents encrypted data with all necessary components for decryption. The key is intentionally not stored here — pass it explicitly to decrypt.

Constructors

from_base64(encoded : String, iv_size : Int32 = 12, tag_size : Int32 = 16) : EncryptedData

Parse from URL-safe base64 encoded string

Source
new(ciphertext : Slice(UInt8), iv : Slice(UInt8), auth_tag : Slice(UInt8))
Source

Instance methods

auth_tag
Source
auth_tag=(auth_tag : Bytes)
Source
ciphertext
Source
ciphertext=(ciphertext : Bytes)
Source
iv=(iv : Bytes)
Source
to_base64

Convert to URL-safe base64 encoded string (all components concatenated)

Source