Cryptor

public class Cryptor : StreamCryptor, Updatable

Encrypts or decrypts, accumulating result.

Useful for small in-memory buffers.

For large files or network streams use StreamCryptor.

  • Retrieves the encrypted or decrypted data.
    

    Declaration

    Swift

    public func final() -> [UInt8]?

    Return Value

    the encrypted or decrypted data or nil if an error occured.

  • Upates the accumulated encrypted/decrypted data with the contents of a raw byte buffer.

    It is not envisaged the users of the framework will need to call this directly.

    Declaration

    Swift

    public func update(from buffer: UnsafeRawPointer, byteCount: Int) -> `Self`?

    Return Value

    this Cryptor object or nil if an error occurs (for optional chaining)