Ciphertext

public struct Ciphertext : EncryptedData

A ciphertext is an ecrypted message. In contrast to EncryptedData it only contains the encrypted message, while EncryptedData might contain other information as well, such as a message authentication code et cetera.

  • The encrypted message.

    Declaration

    Swift

    public let bytes: Bytes
  • The size of the encrypted message in bytes.

    Declaration

    Swift

    public var sizeInBytes: UInt32 { get }
  • Constructs a Ciphertext instance from bytes.

    Note

    The bytes passed to this functions must be encrypted already. This does not encrypt the bytes, use SecretBox or similar for that.

    Declaration

    Swift

    public init(_ bytes: Bytes)