Struct diem_crypto::ed25519::Ed25519PrivateKey [−][src]
pub struct Ed25519PrivateKey(_);
Expand description
An Ed25519 private key
Implementations
Trait Implementations
impl Debug for Ed25519PrivateKey
[src]
impl Debug for Ed25519PrivateKey
[src]impl<'de> Deserialize<'de> for Ed25519PrivateKey
[src]
impl<'de> Deserialize<'de> for Ed25519PrivateKey
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Display for Ed25519PrivateKey
[src]
impl Display for Ed25519PrivateKey
[src]impl From<&'_ Ed25519PrivateKey> for Ed25519PublicKey
[src]
impl From<&'_ Ed25519PrivateKey> for Ed25519PublicKey
[src]fn from(private_key: &Ed25519PrivateKey) -> Self
[src]
fn from(private_key: &Ed25519PrivateKey) -> Self
[src]Performs the conversion.
impl From<&'_ Ed25519PrivateKey> for MultiEd25519PrivateKey
[src]
impl From<&'_ Ed25519PrivateKey> for MultiEd25519PrivateKey
[src]Convenient method to create a MultiEd25519PrivateKey from a single Ed25519PrivateKey.
fn from(ed_private_key: &Ed25519PrivateKey) -> Self
[src]
fn from(ed_private_key: &Ed25519PrivateKey) -> Self
[src]Performs the conversion.
impl Genesis for Ed25519PrivateKey
[src]
impl Genesis for Ed25519PrivateKey
[src]impl Length for Ed25519PrivateKey
[src]
impl Length for Ed25519PrivateKey
[src]impl PartialEq<Ed25519PrivateKey> for Ed25519PrivateKey
[src]
impl PartialEq<Ed25519PrivateKey> for Ed25519PrivateKey
[src]impl PrivateKey for Ed25519PrivateKey
[src]
impl PrivateKey for Ed25519PrivateKey
[src]type PublicKeyMaterial = Ed25519PublicKey
type PublicKeyMaterial = Ed25519PublicKey
We require public / private types to be coupled, i.e. their associated type is each other. Read more
fn public_key(&self) -> Self::PublicKeyMaterial
[src]
fn public_key(&self) -> Self::PublicKeyMaterial
[src]Returns the associated public key
impl Serialize for Ed25519PrivateKey
[src]
impl Serialize for Ed25519PrivateKey
[src]impl SigningKey for Ed25519PrivateKey
[src]
impl SigningKey for Ed25519PrivateKey
[src]type VerifyingKeyMaterial = Ed25519PublicKey
type VerifyingKeyMaterial = Ed25519PublicKey
The associated verifying key type for this signing key.
type SignatureMaterial = Ed25519Signature
type SignatureMaterial = Ed25519Signature
The associated signature type for this signing key.
fn sign<T: CryptoHash + Serialize>(&self, message: &T) -> Ed25519Signature
[src]
fn sign<T: CryptoHash + Serialize>(&self, message: &T) -> Ed25519Signature
[src]Signs an object that has an distinct domain-separation hasher and
that we know how to serialize. There is no pre-hashing into a
HashValue
to be done by the caller. Read more
fn verifying_key(&self) -> Self::VerifyingKeyMaterial
[src]
fn verifying_key(&self) -> Self::VerifyingKeyMaterial
[src]Returns the associated verifying key
impl TryFrom<&'_ [u8]> for Ed25519PrivateKey
[src]
impl TryFrom<&'_ [u8]> for Ed25519PrivateKey
[src]fn try_from(bytes: &[u8]) -> Result<Ed25519PrivateKey, CryptoMaterialError>
[src]
fn try_from(bytes: &[u8]) -> Result<Ed25519PrivateKey, CryptoMaterialError>
[src]Deserialize an Ed25519PrivateKey. This method will also check for key validity.
type Error = CryptoMaterialError
type Error = CryptoMaterialError
The type returned in the event of a conversion error.
impl Uniform for Ed25519PrivateKey
[src]
impl Uniform for Ed25519PrivateKey
[src]fn generate<R>(rng: &mut R) -> Self where
R: RngCore + CryptoRng,
[src]
fn generate<R>(rng: &mut R) -> Self where
R: RngCore + CryptoRng,
[src]Generate key material from an RNG. This should generally not be used for production purposes even with a good source of randomness. When possible use hardware crypto to generate and store private keys. Read more
fn generate_for_testing() -> Self where
Self: Sized,
[src]
fn generate_for_testing() -> Self where
Self: Sized,
[src]Generate a random key using the shared TEST_SEED
impl Eq for Ed25519PrivateKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ed25519PrivateKey
impl Send for Ed25519PrivateKey
impl Sync for Ed25519PrivateKey
impl Unpin for Ed25519PrivateKey
impl UnwindSafe for Ed25519PrivateKey
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
[src]pub fn test_only_hash(&Self) -> HashValue
[src]
pub fn test_only_hash(&Self) -> HashValue
[src]Generates a hash used only for tests.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> ValidCryptoMaterialStringExt for T where
T: ValidCryptoMaterial,
[src]
impl<T> ValidCryptoMaterialStringExt for T where
T: ValidCryptoMaterial,
[src]fn from_encoded_string(encoded_str: &str) -> Result<Self, CryptoMaterialError>
[src]
fn from_encoded_string(encoded_str: &str) -> Result<Self, CryptoMaterialError>
[src]When trying to convert from bytes, we simply decode the string into bytes before checking if we can convert. Read more
fn to_encoded_string(&self) -> Result<String>
[src]
fn to_encoded_string(&self) -> Result<String>
[src]A function to encode into hex-string after serializing.
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,