Module sp_core::crypto [−][src]
Cryptographic utilities.
Modules
key_types | Known key types; this also functions as a global registry of key types for projects wishing to avoid collisions with each other. |
Structs
AccountId32 | An opaque 32-byte cryptographic identifier. |
CryptoTypeId | An identifier for a specific cryptographic algorithm used by a key pair |
CryptoTypePublicPair | A type alias of CryptoTypeId & a public key |
Dummy | Dummy cryptography. Doesn’t do anything. |
KeyTypeId | An identifier for a type of cryptographic key. |
ParseError | Error encountered while parsing |
Enums
DeriveJunction | A since derivation junction description. It is the single parameter used when creating
a new secret key from an existing secret key and, in the case of |
Infallible | The infallible type. |
PublicError | An error type for SS58 decoding. |
SecretStringError | An error with the interpretation of a secret. |
Ss58AddressFormat | A known address (sub)format/network ID for SS58. |
Constants
DEV_ADDRESS | The address of the associated root phrase for our publicly known keys. |
DEV_PHRASE | The root phrase for our publicly known keys. |
JUNCTION_ID_LEN | The length of the junction identifier. Note that this is also referred to as the
|
Traits
CryptoType | Type which has a particular kind of crypto associated with it. |
Derive | Derivable key trait. |
ExposeSecret | Trait for accessing reference to |
IsWrappedBy | One type is wrapped by another. |
Pair | Trait suitable for typical cryptographic PKI key pair type. |
Public | Trait suitable for typical cryptographic PKI key public type. |
Ss58Codec | Key that can be encoded to/from SS58. |
UncheckedFrom | Similar to |
UncheckedInto | The counterpart to |
Wraps | Opposite of |
Zeroize | Trait to zeroize a memory buffer. |
Functions
set_default_ss58_version | Set the default “version” (actually, this is a bit of a misnomer and the version byte is typically used not just to encode format/version but also network identity) that is used for encoding and decoding SS58 addresses. If an unknown version is provided then it fails. |
Type Definitions
SecretString | A store for sensitive data. |
Derive Macros
Zeroize | Trait to zeroize a memory buffer. |