Classes

The following classes are available globally.

  • Encrypts or decrypts, accumulating result.

    Useful for small in-memory buffers.

    For large files or network streams use StreamCryptor.

    See more

    Declaration

    Swift

    public class Cryptor : StreamCryptor, Updatable
  • Public API for message digests.
    

    Usage is straightforward

     let  s = "The quick brown fox jumps over the lazy dog."
     var md5: Digest = Digest(using:.md5)
     md5.update(s)
     let digest = md5.final()
    
    See more

    Declaration

    Swift

    public class Digest : Updatable
  • Calculates a cryptographic Hash-Based Message Authentication Code (HMAC).

    See more

    Declaration

    Swift

    public class HMAC : Updatable
  • Derives key material from a password or passphrase.

    See more

    Declaration

    Swift

    public class PBKDF
  • Generates buffers of random bytes.

    See more

    Declaration

    Swift

    public class Random
  • Encrypts or decrypts return results as they become available.

    Note

    The underlying cipher may be a block or a stream cipher.

    Use for large files or network streams.

    For small, in-memory buffers Cryptor may be easier to use.

    See more

    Declaration

    Swift

    public class StreamCryptor