This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import CommonCrypto | |
internal enum CryptoError: Error { | |
case emptyData | |
case invalidData | |
case invalidKey | |
case fail(status: CCStatus) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@propertyWrapper | |
internal final class Unowned<Wrapped> { | |
private let wrapper: Wrapper | |
fileprivate init(wrapper: Wrapper) { | |
self.wrapper = wrapper | |
} | |
internal var wrappedValue: Wrapped { | |
get { wrapper.get() } |