123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737 |
- // swift-interface-format-version: 1.0
- // swift-compiler-version: Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
- // swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=unchecked -O -module-name CryptoSwift
- @_exported import CryptoSwift
- import Darwin
- import Foundation
- import Swift
- public struct CFB : CryptoSwift.BlockMode {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- public static func == (a: CryptoSwift.CFB.Error, b: CryptoSwift.CFB.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public init(iv: Swift.Array<Swift.UInt8>)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- public class CMAC : CryptoSwift.Authenticator {
- public enum Error : Swift.Error {
- case wrongKeyLength
- public static func == (a: CryptoSwift.CMAC.Error, b: CryptoSwift.CMAC.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(key: Swift.Array<Swift.UInt8>) throws
- public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- public func authenticate(_ bytes: Swift.Array<Swift.UInt8>, cipher: CryptoSwift.Cipher) throws -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- final public class GCM : CryptoSwift.BlockMode {
- public enum Mode {
- case combined
- case detached
- public static func == (a: CryptoSwift.GCM.Mode, b: CryptoSwift.GCM.Mode) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- final public let options: CryptoSwift.BlockModeOption
- public enum Error : Swift.Error {
- case invalidInitializationVector
- case fail
- public static func == (a: CryptoSwift.GCM.Error, b: CryptoSwift.GCM.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- final public var authenticationTag: Swift.Array<Swift.UInt8>?
- public init(iv: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, tagLength: Swift.Int = 16, mode: CryptoSwift.GCM.Mode = .detached)
- convenience public init(iv: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, mode: CryptoSwift.GCM.Mode = .detached)
- final public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- @objc deinit
- }
- @_inheritsConvenienceInitializers final public class CBCMAC : CryptoSwift.CMAC {
- override final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- @objc deinit
- override public init(key: Swift.Array<Swift.UInt8>) throws
- }
- extension AES {
- convenience public init(key: Swift.String, iv: Swift.String, padding: CryptoSwift.Padding = .pkcs7) throws
- }
- public struct HKDF {
- public enum Error : Swift.Error {
- case invalidInput
- case derivedKeyTooLong
- public static func == (a: CryptoSwift.HKDF.Error, b: CryptoSwift.HKDF.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>? = nil, info: Swift.Array<Swift.UInt8>? = nil, keyLength: Swift.Int? = nil, variant: CryptoSwift.HMAC.Variant = .sha256) throws
- public func calculate() throws -> Swift.Array<Swift.UInt8>
- }
- final public class HMAC : CryptoSwift.Authenticator {
- public enum Error : Swift.Error {
- case authenticateError
- case invalidInput
- public static func == (a: CryptoSwift.HMAC.Error, b: CryptoSwift.HMAC.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public enum Variant {
- case sha1, sha256, sha384, sha512, md5
- public static func == (a: CryptoSwift.HMAC.Variant, b: CryptoSwift.HMAC.Variant) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(key: Swift.Array<Swift.UInt8>, variant: CryptoSwift.HMAC.Variant = .md5)
- final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- @_hasMissingDesignatedInitializers final public class AEADChaCha20Poly1305 : CryptoSwift.AEAD {
- public static let kLen: Swift.Int
- public static var ivRange: Swift.Range<Swift.Int>
- public static func encrypt(_ plainText: Swift.Array<Swift.UInt8>, key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>, authenticationHeader: Swift.Array<Swift.UInt8>) throws -> (cipherText: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>)
- public static func decrypt(_ cipherText: Swift.Array<Swift.UInt8>, key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>, authenticationHeader: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>) throws -> (plainText: Swift.Array<Swift.UInt8>, success: Swift.Bool)
- @objc deinit
- }
- final public class Poly1305 : CryptoSwift.Authenticator {
- public enum Error : Swift.Error {
- case authenticateError
- public static func == (a: CryptoSwift.Poly1305.Error, b: CryptoSwift.Poly1305.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public static let blockSize: Swift.Int
- public init(key: Swift.Array<Swift.UInt8>)
- final public func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- public protocol Cryptor {
- mutating func seek(to: Swift.Int) throws
- }
- public typealias CipherOperationOnBlock = (Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>?
- public protocol BlockMode {
- var options: CryptoSwift.BlockModeOption { get }
- func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- public enum CipherError : Swift.Error {
- case encrypt
- case decrypt
- public static func == (a: CryptoSwift.CipherError, b: CryptoSwift.CipherError) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public protocol Cipher : AnyObject {
- var keySize: Swift.Int { get }
- func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- func encrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- func decrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- extension Cipher {
- public func encrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- public func decrypt(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- final public class SHA2 {
- public enum Variant : Swift.RawRepresentable {
- case sha224, sha256, sha384, sha512
- public var digestLength: Swift.Int {
- get
- }
- public var blockSize: Swift.Int {
- get
- }
- public typealias RawValue = Swift.Int
- public var rawValue: CryptoSwift.SHA2.Variant.RawValue {
- get
- }
- public init?(rawValue: CryptoSwift.SHA2.Variant.RawValue)
- }
- public init(variant: CryptoSwift.SHA2.Variant)
- final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- extension SHA2 : CryptoSwift.Updatable {
- final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- }
- extension Blowfish {
- convenience public init(key: Swift.String, iv: Swift.String, padding: CryptoSwift.Padding = .pkcs7) throws
- }
- public protocol Updatable {
- mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool) throws -> Swift.Array<Swift.UInt8>
- mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool, output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- }
- extension Updatable {
- public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false, output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- public mutating func update(withBytes bytes: Swift.Array<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- public mutating func update(withBytes bytes: Swift.Array<Swift.UInt8>, isLast: Swift.Bool = false, output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- public mutating func finish(withBytes bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- public mutating func finish(withBytes bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- public mutating func finish() throws -> Swift.Array<Swift.UInt8>
- public mutating func finish(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- public mutating func finish(withBytes bytes: Swift.Array<Swift.UInt8>, output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- public mutating func finish(output: (Swift.Array<Swift.UInt8>) -> Swift.Void) throws
- }
- @_hasMissingDesignatedInitializers final public class Checksum {
- @objc deinit
- }
- extension Checksum {
- public static func crc32(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
- public static func crc32c(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
- public static func crc16(_ message: Swift.Array<Swift.UInt8>, seed: Swift.UInt16? = nil) -> Swift.UInt16
- }
- extension Rabbit {
- convenience public init(key: Swift.String) throws
- convenience public init(key: Swift.String, iv: Swift.String) throws
- }
- extension PKCS5 {
- public struct PBKDF1 {
- public enum Error : Swift.Error {
- case invalidInput
- case derivedKeyTooLong
- public static func == (a: CryptoSwift.PKCS5.PBKDF1.Error, b: CryptoSwift.PKCS5.PBKDF1.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public enum Variant {
- case md5, sha1
- public static func == (a: CryptoSwift.PKCS5.PBKDF1.Variant, b: CryptoSwift.PKCS5.PBKDF1.Variant) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, variant: CryptoSwift.PKCS5.PBKDF1.Variant = .sha1, iterations: Swift.Int = 4096, keyLength: Swift.Int? = nil) throws
- public func calculate() -> Swift.Array<Swift.UInt8>
- }
- }
- public protocol Cryptors : AnyObject {
- func makeEncryptor() throws -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- func makeDecryptor() throws -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- static func randomIV(_ blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
- }
- extension Cryptors {
- public static func randomIV(_ count: Swift.Int) -> Swift.Array<Swift.UInt8>
- }
- public struct ECB : CryptoSwift.BlockMode {
- public let options: CryptoSwift.BlockModeOption
- public init()
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- public protocol CipherModeWorker {
- var cipherOperation: CryptoSwift.CipherOperationOnBlock { get }
- var additionalBufferSize: Swift.Int { get }
- mutating func encrypt(block plaintext: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- mutating func decrypt(block ciphertext: Swift.ArraySlice<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- }
- public protocol BlockModeWorker : CryptoSwift.CipherModeWorker {
- var blockSize: Swift.Int { get }
- }
- public protocol CounterModeWorker : CryptoSwift.CipherModeWorker {
- associatedtype Counter
- var counter: Self.Counter { get set }
- }
- public protocol SeekableModeWorker : CryptoSwift.CipherModeWorker {
- mutating func seek(to position: Swift.Int) throws
- }
- public protocol StreamModeWorker : CryptoSwift.CipherModeWorker {
- }
- public protocol FinalizingEncryptModeWorker : CryptoSwift.CipherModeWorker {
- mutating func finalize(encrypt ciphertext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
- }
- public protocol FinalizingDecryptModeWorker : CryptoSwift.CipherModeWorker {
- @discardableResult
- mutating func willDecryptLast(bytes ciphertext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
- mutating func didDecryptLast(bytes plaintext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
- mutating func finalize(decrypt plaintext: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.ArraySlice<Swift.UInt8>
- }
- extension HMAC {
- convenience public init(key: Swift.String, variant: CryptoSwift.HMAC.Variant = .md5) throws
- }
- extension String {
- public var bytes: Swift.Array<Swift.UInt8> {
- get
- }
- public func md5() -> Swift.String
- public func sha1() -> Swift.String
- public func sha224() -> Swift.String
- public func sha256() -> Swift.String
- public func sha384() -> Swift.String
- public func sha512() -> Swift.String
- public func sha3(_ variant: CryptoSwift.SHA3.Variant) -> Swift.String
- public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.String
- public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.String
- public func crc16(seed: Swift.UInt16? = nil) -> Swift.String
- public func encrypt(cipher: CryptoSwift.Cipher) throws -> Swift.String
- public func encryptToBase64(cipher: CryptoSwift.Cipher) throws -> Swift.String?
- public func authenticate<A>(with authenticator: A) throws -> Swift.String where A : CryptoSwift.Authenticator
- }
- public enum PKCS7 {
- }
- final public class SHA1 {
- public init()
- final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- extension SHA1 : CryptoSwift.Updatable {
- @discardableResult
- final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- }
- public enum Bit : Swift.Int {
- case zero
- case one
- public typealias RawValue = Swift.Int
- public init?(rawValue: Swift.Int)
- public var rawValue: Swift.Int {
- get
- }
- }
- extension ChaCha20 {
- convenience public init(key: Swift.String, iv: Swift.String) throws
- }
- public struct CCM {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- case invalidParameter
- case fail
- public static func == (a: CryptoSwift.CCM.Error, b: CryptoSwift.CCM.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public var authenticationTag: Swift.Array<Swift.UInt8>?
- public init(iv: Swift.Array<Swift.UInt8>, tagLength: Swift.Int, messageLength: Swift.Int, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil)
- public init(iv: Swift.Array<Swift.UInt8>, tagLength: Swift.Int, messageLength: Swift.Int, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- public struct CTR {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- public static func == (a: CryptoSwift.CTR.Error, b: CryptoSwift.CTR.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public init(iv: Swift.Array<Swift.UInt8>, counter: Swift.Int = 0)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- final public class MD5 {
- public init()
- final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- extension MD5 : CryptoSwift.Updatable {
- final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- }
- final public class AES {
- public enum Error : Swift.Error {
- case invalidKeySize
- case dataPaddingRequired
- case invalidData
- public static func == (a: CryptoSwift.AES.Error, b: CryptoSwift.AES.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public enum Variant : Swift.Int {
- case aes128, aes192, aes256
- public typealias RawValue = Swift.Int
- public init?(rawValue: Swift.Int)
- public var rawValue: Swift.Int {
- get
- }
- }
- public static let blockSize: Swift.Int
- final public let keySize: Swift.Int
- final public let variant: CryptoSwift.AES.Variant
- public init(key: Swift.Array<Swift.UInt8>, blockMode: CryptoSwift.BlockMode, padding: CryptoSwift.Padding = .pkcs7) throws
- @objc deinit
- }
- extension AES : CryptoSwift.Cipher {
- final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- final public class Blowfish {
- public enum Error : Swift.Error {
- case dataPaddingRequired
- case invalidKeyOrInitializationVector
- case invalidInitializationVector
- case invalidBlockMode
- public static func == (a: CryptoSwift.Blowfish.Error, b: CryptoSwift.Blowfish.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public static let blockSize: Swift.Int
- final public let keySize: Swift.Int
- public init(key: Swift.Array<Swift.UInt8>, blockMode: CryptoSwift.BlockMode = CBC(iv: Array<UInt8>(repeating: 0, count: Blowfish.blockSize)), padding: CryptoSwift.Padding) throws
- @objc deinit
- }
- extension Blowfish : CryptoSwift.Cipher {
- final public func encrypt<C>(_ bytes: C) throws -> Swift.Array<Swift.UInt8> where C : Swift.Collection, C.Element == Swift.UInt8, C.Index == Swift.Int
- final public func decrypt<C>(_ bytes: C) throws -> Swift.Array<Swift.UInt8> where C : Swift.Collection, C.Element == Swift.UInt8, C.Index == Swift.Int
- }
- public protocol PaddingProtocol {
- func add(to: Swift.Array<Swift.UInt8>, blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
- func remove(from: Swift.Array<Swift.UInt8>, blockSize: Swift.Int?) -> Swift.Array<Swift.UInt8>
- }
- public enum Padding : CryptoSwift.PaddingProtocol {
- case noPadding, zeroPadding, pkcs7, pkcs5, iso78164
- public func add(to: Swift.Array<Swift.UInt8>, blockSize: Swift.Int) -> Swift.Array<Swift.UInt8>
- public func remove(from: Swift.Array<Swift.UInt8>, blockSize: Swift.Int?) -> Swift.Array<Swift.UInt8>
- public static func == (a: CryptoSwift.Padding, b: CryptoSwift.Padding) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- extension Data {
- public func checksum() -> Swift.UInt16
- public func md5() -> Foundation.Data
- public func sha1() -> Foundation.Data
- public func sha224() -> Foundation.Data
- public func sha256() -> Foundation.Data
- public func sha384() -> Foundation.Data
- public func sha512() -> Foundation.Data
- public func sha3(_ variant: CryptoSwift.SHA3.Variant) -> Foundation.Data
- public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Foundation.Data
- public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Foundation.Data
- public func crc16(seed: Swift.UInt16? = nil) -> Foundation.Data
- public func encrypt(cipher: CryptoSwift.Cipher) throws -> Foundation.Data
- public func decrypt(cipher: CryptoSwift.Cipher) throws -> Foundation.Data
- public func authenticate(with authenticator: CryptoSwift.Authenticator) throws -> Foundation.Data
- }
- extension Data {
- public init(hex: Swift.String)
- public var bytes: Swift.Array<Swift.UInt8> {
- get
- }
- public func toHexString() -> Swift.String
- }
- public protocol _UInt8Type {
- }
- extension UInt8 : CryptoSwift._UInt8Type {
- }
- extension UInt8 {
- public func bits() -> [CryptoSwift.Bit]
- public func bits() -> Swift.String
- }
- public struct OFB : CryptoSwift.BlockMode {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- public static func == (a: CryptoSwift.OFB.Error, b: CryptoSwift.OFB.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public init(iv: Swift.Array<Swift.UInt8>)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- public struct BlockModeOption : Swift.OptionSet {
- public let rawValue: Swift.Int
- public init(rawValue: Swift.Int)
- public typealias Element = CryptoSwift.BlockModeOption
- public typealias ArrayLiteralElement = CryptoSwift.BlockModeOption
- public typealias RawValue = Swift.Int
- }
- extension AES : CryptoSwift.Cryptors {
- final public func makeEncryptor() throws -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- final public func makeDecryptor() throws -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- }
- extension Array where Element == Swift.UInt8 {
- public init(hex: Swift.String)
- public func toHexString() -> Swift.String
- }
- extension Array where Element == Swift.UInt8 {
- @available(*, deprecated)
- public func chunks(size chunksize: Swift.Int) -> Swift.Array<Swift.Array<Element>>
- public func md5() -> [Element]
- public func sha1() -> [Element]
- public func sha224() -> [Element]
- public func sha256() -> [Element]
- public func sha384() -> [Element]
- public func sha512() -> [Element]
- public func sha2(_ variant: CryptoSwift.SHA2.Variant) -> [Element]
- public func sha3(_ variant: CryptoSwift.SHA3.Variant) -> [Element]
- public func crc32(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
- public func crc32c(seed: Swift.UInt32? = nil, reflect: Swift.Bool = true) -> Swift.UInt32
- public func crc16(seed: Swift.UInt16? = nil) -> Swift.UInt16
- public func encrypt(cipher: CryptoSwift.Cipher) throws -> [Element]
- public func decrypt(cipher: CryptoSwift.Cipher) throws -> [Element]
- public func authenticate<A>(with authenticator: A) throws -> [Element] where A : CryptoSwift.Authenticator
- }
- public enum PKCS5 {
- }
- public protocol AEAD {
- static var kLen: Swift.Int { get }
- static var ivRange: Swift.Range<Swift.Int> { get }
- }
- final public class OCB : CryptoSwift.BlockMode {
- public enum Mode {
- case combined
- case detached
- public static func == (a: CryptoSwift.OCB.Mode, b: CryptoSwift.OCB.Mode) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- final public let options: CryptoSwift.BlockModeOption
- public enum Error : Swift.Error {
- case invalidNonce
- case fail
- public static func == (a: CryptoSwift.OCB.Error, b: CryptoSwift.OCB.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- final public var authenticationTag: Swift.Array<Swift.UInt8>?
- public init(nonce N: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, tagLength: Swift.Int = 16, mode: CryptoSwift.OCB.Mode = .detached)
- convenience public init(nonce N: Swift.Array<Swift.UInt8>, authenticationTag: Swift.Array<Swift.UInt8>, additionalAuthenticatedData: Swift.Array<Swift.UInt8>? = nil, mode: CryptoSwift.OCB.Mode = .detached)
- final public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- @objc deinit
- }
- public struct PCBC : CryptoSwift.BlockMode {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- public static func == (a: CryptoSwift.PCBC.Error, b: CryptoSwift.PCBC.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public init(iv: Swift.Array<Swift.UInt8>)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- final public class ChaCha20 {
- public enum Error : Swift.Error {
- case invalidKeyOrInitializationVector
- case notSupported
- public static func == (a: CryptoSwift.ChaCha20.Error, b: CryptoSwift.ChaCha20.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public static let blockSize: Swift.Int
- final public let keySize: Swift.Int
- public init(key: Swift.Array<Swift.UInt8>, iv nonce: Swift.Array<Swift.UInt8>) throws
- @objc deinit
- }
- extension ChaCha20 : CryptoSwift.Cipher {
- final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- extension ChaCha20 {
- public struct ChaChaEncryptor : CryptoSwift.Cryptor, CryptoSwift.Updatable {
- public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- public func seek(to: Swift.Int) throws
- }
- }
- extension ChaCha20 {
- public struct ChaChaDecryptor : CryptoSwift.Cryptor, CryptoSwift.Updatable {
- public mutating func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = true) throws -> Swift.Array<Swift.UInt8>
- public func seek(to: Swift.Int) throws
- }
- }
- extension ChaCha20 : CryptoSwift.Cryptors {
- final public func makeEncryptor() -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- final public func makeDecryptor() -> CryptoSwift.Cryptor & CryptoSwift.Updatable
- }
- public struct CBC : CryptoSwift.BlockMode {
- public enum Error : Swift.Error {
- case invalidInitializationVector
- public static func == (a: CryptoSwift.CBC.Error, b: CryptoSwift.CBC.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public let options: CryptoSwift.BlockModeOption
- public init(iv: Swift.Array<Swift.UInt8>)
- public func worker(blockSize: Swift.Int, cipherOperation: @escaping CryptoSwift.CipherOperationOnBlock, encryptionOperation: @escaping CryptoSwift.CipherOperationOnBlock) throws -> CryptoSwift.CipherModeWorker
- }
- extension PKCS5 {
- public struct PBKDF2 {
- public enum Error : Swift.Error {
- case invalidInput
- case derivedKeyTooLong
- public static func == (a: CryptoSwift.PKCS5.PBKDF2.Error, b: CryptoSwift.PKCS5.PBKDF2.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, iterations: Swift.Int = 4096, keyLength: Swift.Int? = nil, variant: CryptoSwift.HMAC.Variant = .sha256) throws
- public func calculate() throws -> Swift.Array<Swift.UInt8>
- }
- }
- public protocol Authenticator {
- func authenticate(_ bytes: Swift.Array<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- final public class Rabbit {
- public enum Error : Swift.Error {
- case invalidKeyOrInitializationVector
- public static func == (a: CryptoSwift.Rabbit.Error, b: CryptoSwift.Rabbit.Error) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public static let ivSize: Swift.Int
- public static let keySize: Swift.Int
- public static let blockSize: Swift.Int
- final public var keySize: Swift.Int {
- get
- }
- convenience public init(key: Swift.Array<Swift.UInt8>) throws
- public init(key: Swift.Array<Swift.UInt8>, iv: Swift.Array<Swift.UInt8>?) throws
- @objc deinit
- }
- extension Rabbit : CryptoSwift.Cipher {
- final public func encrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- final public func decrypt(_ bytes: Swift.ArraySlice<Swift.UInt8>) throws -> Swift.Array<Swift.UInt8>
- }
- @_hasMissingDesignatedInitializers public class BlockDecryptor : CryptoSwift.Cryptor, CryptoSwift.Updatable {
- public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- public func seek(to position: Swift.Int) throws
- @objc deinit
- }
- extension String {
- public func decryptBase64ToString(cipher: CryptoSwift.Cipher) throws -> Swift.String
- public func decryptBase64(cipher: CryptoSwift.Cipher) throws -> Swift.Array<Swift.UInt8>
- }
- extension Array where Element == Swift.UInt8 {
- public func toBase64() -> Swift.String?
- public init(base64: Swift.String)
- }
- final public class SHA3 {
- final public let blockSize: Swift.Int
- final public let digestLength: Swift.Int
- final public let markByte: Swift.UInt8
- public enum Variant {
- case sha224, sha256, sha384, sha512, keccak224, keccak256, keccak384, keccak512
- public var outputLength: Swift.Int {
- get
- }
- public static func == (a: CryptoSwift.SHA3.Variant, b: CryptoSwift.SHA3.Variant) -> Swift.Bool
- public var hashValue: Swift.Int {
- get
- }
- public func hash(into hasher: inout Swift.Hasher)
- }
- public init(variant: CryptoSwift.SHA3.Variant)
- final public func calculate(for bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- @objc deinit
- }
- extension SHA3 : CryptoSwift.Updatable {
- final public func update(withBytes bytes: Swift.ArraySlice<Swift.UInt8>, isLast: Swift.Bool = false) throws -> Swift.Array<Swift.UInt8>
- }
- final public class Scrypt {
- public init(password: Swift.Array<Swift.UInt8>, salt: Swift.Array<Swift.UInt8>, dkLen: Swift.Int, N: Swift.Int, r: Swift.Int, p: Swift.Int) throws
- final public func calculate() throws -> [Swift.UInt8]
- @objc deinit
- }
- @available(*, renamed: "Digest")
- public typealias Hash = CryptoSwift.Digest
- public struct Digest {
- public static func md5(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha1(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha224(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha256(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha384(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha512(_ bytes: Swift.Array<Swift.UInt8>) -> Swift.Array<Swift.UInt8>
- public static func sha2(_ bytes: Swift.Array<Swift.UInt8>, variant: CryptoSwift.SHA2.Variant) -> Swift.Array<Swift.UInt8>
- public static func sha3(_ bytes: Swift.Array<Swift.UInt8>, variant: CryptoSwift.SHA3.Variant) -> Swift.Array<Swift.UInt8>
- }
- extension CryptoSwift.CFB.Error : Swift.Equatable {}
- extension CryptoSwift.CFB.Error : Swift.Hashable {}
- extension CryptoSwift.CMAC.Error : Swift.Equatable {}
- extension CryptoSwift.CMAC.Error : Swift.Hashable {}
- extension CryptoSwift.GCM.Mode : Swift.Equatable {}
- extension CryptoSwift.GCM.Mode : Swift.Hashable {}
- extension CryptoSwift.GCM.Error : Swift.Equatable {}
- extension CryptoSwift.GCM.Error : Swift.Hashable {}
- extension CryptoSwift.HKDF.Error : Swift.Equatable {}
- extension CryptoSwift.HKDF.Error : Swift.Hashable {}
- extension CryptoSwift.HMAC.Error : Swift.Equatable {}
- extension CryptoSwift.HMAC.Error : Swift.Hashable {}
- extension CryptoSwift.HMAC.Variant : Swift.Equatable {}
- extension CryptoSwift.HMAC.Variant : Swift.Hashable {}
- extension CryptoSwift.Poly1305.Error : Swift.Equatable {}
- extension CryptoSwift.Poly1305.Error : Swift.Hashable {}
- extension CryptoSwift.CipherError : Swift.Equatable {}
- extension CryptoSwift.CipherError : Swift.Hashable {}
- extension CryptoSwift.SHA2.Variant : Swift.Equatable {}
- extension CryptoSwift.SHA2.Variant : Swift.Hashable {}
- extension CryptoSwift.PKCS5.PBKDF1.Error : Swift.Equatable {}
- extension CryptoSwift.PKCS5.PBKDF1.Error : Swift.Hashable {}
- extension CryptoSwift.PKCS5.PBKDF1.Variant : Swift.Equatable {}
- extension CryptoSwift.PKCS5.PBKDF1.Variant : Swift.Hashable {}
- extension CryptoSwift.Bit : Swift.Equatable {}
- extension CryptoSwift.Bit : Swift.Hashable {}
- extension CryptoSwift.Bit : Swift.RawRepresentable {}
- extension CryptoSwift.CCM : CryptoSwift.BlockMode {}
- extension CryptoSwift.CCM.Error : Swift.Equatable {}
- extension CryptoSwift.CCM.Error : Swift.Hashable {}
- extension CryptoSwift.CTR : CryptoSwift.BlockMode {}
- extension CryptoSwift.CTR.Error : Swift.Equatable {}
- extension CryptoSwift.CTR.Error : Swift.Hashable {}
- extension CryptoSwift.AES.Error : Swift.Equatable {}
- extension CryptoSwift.AES.Error : Swift.Hashable {}
- extension CryptoSwift.AES.Variant : Swift.Equatable {}
- extension CryptoSwift.AES.Variant : Swift.Hashable {}
- extension CryptoSwift.AES.Variant : Swift.RawRepresentable {}
- extension CryptoSwift.Blowfish.Error : Swift.Equatable {}
- extension CryptoSwift.Blowfish.Error : Swift.Hashable {}
- extension CryptoSwift.Padding : Swift.Equatable {}
- extension CryptoSwift.Padding : Swift.Hashable {}
- extension CryptoSwift.OFB.Error : Swift.Equatable {}
- extension CryptoSwift.OFB.Error : Swift.Hashable {}
- extension CryptoSwift.OCB.Mode : Swift.Equatable {}
- extension CryptoSwift.OCB.Mode : Swift.Hashable {}
- extension CryptoSwift.OCB.Error : Swift.Equatable {}
- extension CryptoSwift.OCB.Error : Swift.Hashable {}
- extension CryptoSwift.PCBC.Error : Swift.Equatable {}
- extension CryptoSwift.PCBC.Error : Swift.Hashable {}
- extension CryptoSwift.ChaCha20.Error : Swift.Equatable {}
- extension CryptoSwift.ChaCha20.Error : Swift.Hashable {}
- extension CryptoSwift.CBC.Error : Swift.Equatable {}
- extension CryptoSwift.CBC.Error : Swift.Hashable {}
- extension CryptoSwift.PKCS5.PBKDF2.Error : Swift.Equatable {}
- extension CryptoSwift.PKCS5.PBKDF2.Error : Swift.Hashable {}
- extension CryptoSwift.Rabbit.Error : Swift.Equatable {}
- extension CryptoSwift.Rabbit.Error : Swift.Hashable {}
- extension CryptoSwift.SHA3.Variant : Swift.Equatable {}
- extension CryptoSwift.SHA3.Variant : Swift.Hashable {}
|