| ... | ... | @@ -164,31 +164,93 @@ const std = @import("std.zig"); |
| 164 | 164 | |
| 165 | 165 | pub const errors = @import("crypto/errors.zig"); |
| 166 | 166 | |
| 167 | | test "crypto" { |
| 167 | test { |
| 168 | 168 | const please_windows_dont_oom = @import("builtin").os.tag == .windows; |
| 169 | 169 | if (please_windows_dont_oom) return error.SkipZigTest; |
| 170 | 170 | |
| 171 | | inline for (std.meta.declarations(@This())) |decl| { |
| 172 | | switch (decl.data) { |
| 173 | | .Type => |t| { |
| 174 | | if (@typeInfo(t) != .ErrorSet) { |
| 175 | | std.testing.refAllDecls(t); |
| 176 | | } |
| 177 | | }, |
| 178 | | .Var => |v| { |
| 179 | | _ = v; |
| 180 | | }, |
| 181 | | .Fn => |f| { |
| 182 | | _ = f; |
| 183 | | }, |
| 184 | | } |
| 185 | | } |
| 171 | _ = aead.aegis.Aegis128L; |
| 172 | _ = aead.aegis.Aegis256; |
| 173 | |
| 174 | _ = aead.aes_gcm.Aes128Gcm; |
| 175 | _ = aead.aes_gcm.Aes256Gcm; |
| 176 | |
| 177 | _ = aead.aes_ocb.Aes128Ocb; |
| 178 | _ = aead.aes_ocb.Aes256Ocb; |
| 179 | |
| 180 | _ = aead.Gimli; |
| 181 | |
| 182 | _ = aead.chacha_poly.ChaCha20Poly1305; |
| 183 | _ = aead.chacha_poly.ChaCha12Poly1305; |
| 184 | _ = aead.chacha_poly.ChaCha8Poly1305; |
| 185 | _ = aead.chacha_poly.XChaCha20Poly1305; |
| 186 | _ = aead.chacha_poly.XChaCha12Poly1305; |
| 187 | _ = aead.chacha_poly.XChaCha8Poly1305; |
| 188 | |
| 189 | _ = aead.isap; |
| 190 | _ = aead.salsa_poly.XSalsa20Poly1305; |
| 191 | |
| 192 | _ = auth.hmac; |
| 193 | _ = auth.siphash; |
| 194 | |
| 195 | _ = core.aes; |
| 196 | _ = core.Gimli; |
| 197 | _ = core.modes; |
| 198 | |
| 199 | _ = dh.X25519; |
| 200 | |
| 201 | _ = ecc.Curve25519; |
| 202 | _ = ecc.Edwards25519; |
| 203 | _ = ecc.P256; |
| 204 | _ = ecc.Ristretto255; |
| 205 | |
| 206 | _ = hash.blake2; |
| 207 | _ = hash.Blake3; |
| 208 | _ = hash.Gimli; |
| 209 | _ = hash.Md5; |
| 210 | _ = hash.Sha1; |
| 211 | _ = hash.sha2; |
| 212 | _ = hash.sha3; |
| 213 | |
| 214 | _ = kdf.hkdf; |
| 215 | |
| 216 | _ = onetimeauth.Ghash; |
| 217 | _ = onetimeauth.Poly1305; |
| 218 | |
| 219 | _ = pwhash.Encoding; |
| 220 | |
| 221 | _ = pwhash.Error; |
| 222 | _ = pwhash.HasherError; |
| 223 | _ = pwhash.KdfError; |
| 224 | |
| 225 | _ = pwhash.argon2; |
| 226 | _ = pwhash.bcrypt; |
| 227 | _ = pwhash.scrypt; |
| 228 | _ = pwhash.pbkdf2; |
| 229 | |
| 230 | _ = pwhash.phc_format; |
| 231 | |
| 232 | _ = sign.Ed25519; |
| 233 | |
| 234 | _ = stream.chacha.ChaCha20IETF; |
| 235 | _ = stream.chacha.ChaCha12IETF; |
| 236 | _ = stream.chacha.ChaCha8IETF; |
| 237 | _ = stream.chacha.ChaCha20With64BitNonce; |
| 238 | _ = stream.chacha.ChaCha12With64BitNonce; |
| 239 | _ = stream.chacha.ChaCha8With64BitNonce; |
| 240 | _ = stream.chacha.XChaCha20IETF; |
| 241 | _ = stream.chacha.XChaCha12IETF; |
| 242 | _ = stream.chacha.XChaCha8IETF; |
| 243 | |
| 244 | _ = stream.salsa.Salsa20; |
| 245 | _ = stream.salsa.XSalsa20; |
| 246 | |
| 247 | _ = nacl.Box; |
| 248 | _ = nacl.SecretBox; |
| 249 | _ = nacl.SealedBox; |
| 186 | 250 | |
| 187 | | _ = @import("crypto/aegis.zig"); |
| 188 | | _ = @import("crypto/aes_gcm.zig"); |
| 189 | | _ = @import("crypto/aes_ocb.zig"); |
| 190 | | _ = @import("crypto/blake2.zig"); |
| 191 | | _ = @import("crypto/chacha20.zig"); |
| 251 | _ = utils; |
| 252 | _ = random; |
| 253 | _ = errors; |
| 192 | 254 | } |
| 193 | 255 | |
| 194 | 256 | test "CSPRNG" { |