Skip to main content

Crate use_crypto

Crate use_crypto 

Source
Expand description

§use-crypto

Cryptographic algorithm, key, signature, digest, and encoding-label primitives for RustUse.

§Experimental

use-crypto is experimental while the use-security workspace remains below 0.3.0. Expect small API adjustments during the first release wave.

§Example

use use_crypto::{CryptoStrength, HashAlgorithm};

assert_eq!(HashAlgorithm::Sha256.strength(), CryptoStrength::Strong);
assert!(HashAlgorithm::Md5.is_deprecated_like());

§Scope

  • Cryptographic algorithm, hash, signature, encryption, key, usage, encoding, and strength labels.
  • Metadata helpers for deprecated or weak algorithm labels.

§Non-goals

  • Cryptographic operations.
  • Key generation.
  • Hashing, signing, encryption, decryption, or certificate handling.

§License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license

Enums§

CryptoAlgorithm
Broad cryptographic algorithm category labels.
CryptoEncoding
Cryptographic encoding labels.
CryptoParseError
Error returned when a crypto label cannot be parsed.
CryptoStrength
Cryptographic strength labels.
EncryptionAlgorithm
Encryption algorithm labels.
HashAlgorithm
Hash algorithm labels.
KeyAlgorithm
Key algorithm labels.
KeyKind
Key kind labels.
KeyUsage
Key usage labels.
SignatureAlgorithm
Signature algorithm labels.

Functions§

is_deprecated_like
Returns true when a hash algorithm label is deprecated-like.