60 ValidateAeadMessageSize,
62 ValidateAeadPartialOverlap,
63 ValidateAeadSealCiphertextOverlap,
64 ValidateAeadSealTagOverlap,
65 ValidateAeadOpenPlaintextOverlap,
67 ValidateCipherInitializationVector,
69 ValidateCipherOverlap,
70 ValidateCipherBlockInput,
71 ValidateCipherFinalBlock,
72 ValidateCipherPadding,
74 AppleCommonCryptoRandomGenerate,
75 AppleCommonCryptoAeadCreate,
76 AppleCommonCryptoAeadEncrypt,
77 AppleCommonCryptoCipherCreate,
78 AppleCommonCryptoCipherUpdate,
79 WindowsBCryptRandomGenerate,
80 WindowsBCryptAeadOpenAlgorithm,
81 WindowsBCryptAeadSetGcmMode,
82 WindowsBCryptAeadQueryObjectLength,
83 WindowsBCryptAeadKeyObjectCapacity,
84 WindowsBCryptAeadGenerateKey,
85 WindowsBCryptAeadEncrypt,
86 WindowsBCryptAeadDecrypt,
87 WindowsBCryptCipherOpenAlgorithm,
88 WindowsBCryptCipherSetCbcMode,
89 WindowsBCryptCipherQueryObjectLength,
90 WindowsBCryptCipherKeyObjectCapacity,
91 WindowsBCryptCipherGenerateKey,
92 WindowsBCryptCipherEncrypt,
93 WindowsBCryptCipherDecrypt,
94 WindowsBCryptHmacOpenAlgorithm,
95 WindowsBCryptHmacQueryObjectLength,
96 WindowsBCryptHmacObjectCapacity,
97 WindowsBCryptHmacCreate,
98 WindowsBCryptHmacUpdate,
99 WindowsBCryptHmacFinalize,
101 LinuxAFAlgCreateAlgorithmSocket,
102 LinuxAFAlgBindAlgorithmSocket,
103 LinuxAFAlgAcceptOperationSocket,
105 LinuxAFAlgSetAeadAuthenticationSize,
106 LinuxAFAlgAeadSealSend,
107 LinuxAFAlgAeadSealReceive,
108 LinuxAFAlgAeadOpenSend,
109 LinuxAFAlgAeadOpenReceive,
110 LinuxAFAlgCipherSend,
111 LinuxAFAlgCipherReceive,
113 LinuxAFAlgHmacReceive,
114 OpenSSL3RuntimeUnavailable,
115 OpenSSL3AeadFetchCipher,
116 OpenSSL3AeadCreateContext,
117 OpenSSL3AeadInitialize,
118 OpenSSL3AeadAssociatedDataUpdate,
119 OpenSSL3AeadPayloadUpdate,
120 OpenSSL3AeadSealFinalize,
121 OpenSSL3AeadGetAuthenticationTag,
122 OpenSSL3AeadSetAuthenticationTag,
123 OpenSSL3AeadOpenFinalize,
125 OpenSSL3CipherCreateContext,
126 OpenSSL3CipherInitialize,
127 OpenSSL3CipherSetPadding,
128 OpenSSL3CipherUpdate,
130 OpenSSL3HmacCreateContext,
131 OpenSSL3HmacInitialize,
133 OpenSSL3HmacFinalize,
205 : result(Result::Error(CryptographyResultCategory, error)), detail(detail)
209 : result(Result::Error(CryptographyResultCategory, error)), detail(detail), contextKind(contextKind),
214 template <
typename ResultLike>
221 return {error, detail, CryptographyErrorContextKind::AppleCommonCryptoStatus,
234 return {error, detail, CryptographyErrorContextKind::PosixErrno,
239 uint32_t expectedBytes)
241 return {error, detail, CryptographyErrorContextKind::ExpectedBytes,
246 uint32_t requiredBytes)
248 return {error, detail, CryptographyErrorContextKind::RequiredBytes,
253 uint32_t maximumBytes)
255 return {error, detail, CryptographyErrorContextKind::MaximumBytes,
260 uint32_t actualBytes)
262 return {error, detail, CryptographyErrorContextKind::ActualBytes,
266 explicit constexpr operator bool()
const {
return static_cast<bool>(result); }
267 constexpr operator Result()
const {
return result; }
268 constexpr Result toResult()
const {
return result; }
269 constexpr bool isError(
CryptographyError error)
const {
return result.isError(CryptographyResultCategory, error); }
A typed scalar payload for a Cryptography error.
Definition CryptographyError.h:151