Trait elliptic_curve::secret_key::SecretValue
source ·
[−]pub trait SecretValue: Curve {
type Secret: Into<FieldBytes<Self>> + Zeroize;
fn from_secret_bytes(bytes: &FieldBytes<Self>) -> Option<Self::Secret>;
}
Expand description
Inner value stored by a SecretKey
.
Associated Types
type Secret: Into<FieldBytes<Self>> + Zeroize
type Secret: Into<FieldBytes<Self>> + Zeroize
Inner secret value.
⚠️ WARNING ⚠️
This type is not intended to be part of the public API and in future versions of this crate we will try to explore ways to hide it.
Crates such as k256
and p256
conditionally define this type
differently depending on what cargo features are enabled.
This means any consumers of this crate attempting to use this type
may experience breakages if the cargo features are not what are
expected.
We regret exposing it as part of the public API for now, however if you do reference this type as a downstream consumer of a curve crate, be aware you will experience breakages!
Required methods
fn from_secret_bytes(bytes: &FieldBytes<Self>) -> Option<Self::Secret>
fn from_secret_bytes(bytes: &FieldBytes<Self>) -> Option<Self::Secret>
Parse the secret value from bytes