[−][src]Trait solana_libra_nextgen_crypto::traits::ValidKey
Key material with a notion of byte validation.
A type family for material that knows how to serialize and
deserialize, as well as validate byte-encoded material. The
validation must be implemented as a TryFrom
which
classifies its failures against the above
CryptoMaterialError
.
This provides an implementation for a validation that relies on a
round-trip to bytes and corresponding TryFrom
.
Required methods
Loading content...Provided methods
fn validate(&self) -> Result<(), CryptoMaterialError>
TryFrom is the source of truth on whether we can build a valid key. => we can use it once we've built, to validate!