Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

Module traits

Module traits 

Source

Modules§

hazmat
This is a “Hazardous Materials” module. You should ONLY use it if you’re 100% absolutely sure that you know what you’re doing because this module is full of land mines, dragons, and dinosaurs with laser guns.

Structs§

Hmac
Generic HMAC instance.
Zeroizing
Zeroizing is a wrapper for any Z: Zeroize type which implements a Drop handler which zeroizes dropped values.

Enums§

LineEndingPem
Line endings: variants of newline characters that can be used with Base64.

Traits§

AeadInOut
In-place and inout AEAD trait which handles the authentication tag as a return value/separate parameter.
DecodeDer
Decode trait parses a complete TLV (Tag-Length-Value) structure.
DecodePem
PEM decoding trait.
Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
DigestSigner
Sign the given prehashed message Digest using Self.
DigestVerifier
Verify the provided signature for the given prehashed message Digest is authentic.
DynSignatureAlgorithmIdentifier
Returns AlgorithmIdentifierOwned associated with the signature system.
EncodeDer
Encode trait produces a complete TLV (Tag-Length-Value) structure.
EncodePem
PEM encoding trait.
FixedOutput
Trait for hash functions with fixed-size output.
FromSec1Point
Decode curve point using the Octet-String-to-Elliptic-Curve-Point conversion described in SEC 1: Elliptic Curve Cryptography (Version 2.0) §2.3.4 (page 11).
Generate
Secure random generation.
KeyInit
Types which can be initialized from a key.
Keypair
Signing keypair with an associated verifying key.
Mac
Convenience wrapper trait covering functionality of Message Authentication algorithms.
OutputSizeUser
Types which return data with the given size.
OwnedToRef
A trait for borrowing data from an owned struct
Pkcs1DecodeRsaPrivateKey
Parse an RsaPrivateKey from a PKCS#1-encoded document.
Pkcs1EncodeRsaPrivateKey
Serialize a RsaPrivateKey to a PKCS#1 encoded document.
Pkcs8DecodePrivateKey
Parse a private key object from a PKCS#8 encoded document.
Pkcs8EncodePrivateKey
Serialize a private key object to a PKCS#8 encoded document.
PublicKeyParts
Components of an RSA public key.
RandomizedSigner
Sign the given message using the provided external randomness source.
SignatureEncoding
Support for decoding/encoding signatures as bytes.
Signer
Sign the provided message bytestring using Self (e.g. a cryptographic key or connection to an HSM), returning a digital signature.
SpkiDecodePublicKey
Parse a public key object from an encoded SPKI document.
SpkiEncodePublicKey
Serialize a public key object to a SPKI-encoded document.
ToExtension
Trait to be implemented by extensions to allow them to be formatted as x509 v3 extensions by builder.
ToSec1Point
Encode curve point using the Elliptic-Curve-Point-to-Octet-String conversion described in SEC 1: Elliptic Curve Cryptography (Version 2.0) §2.3.3 (page 10).
Verifier
Verify the provided message bytestring using Self (e.g. a public key).