[−][src]Trait dup_crypto::keys::PrivateKey
Define the operations that can be performed on a cryptographic private key.
A PrivateKey
can be converted from/to Base58 format.
When converted back and forth the value should be the same.
A PrivateKey
is used to sign a message. The corresponding PublicKey
will then be used to verify that signature.
Associated Types
Loading content...Required methods
fn from_base58(base58_string: &str) -> Result<Self, BaseConvertionError>
Create a PrivateKey from a Base58 string.
The Base58 string should contains only valid Base58 characters
and have a correct length. If it's not the case, a BaseConvertionError
is returned with the corresponding variant.
fn sign(&self, message: &[u8]) -> Self::Signature
Sign a message with this private key.