Struct multiversx_sdk::crypto::private_key::PrivateKey
source · Tuple Fields§
§0: [u8; 64]
Implementations§
source§impl PrivateKey
impl PrivateKey
pub fn from_bytes(bytes: &[u8]) -> Result<PrivateKey>
pub fn from_hex_str(pk: &str) -> Result<Self>
pub fn generate<T>(r: &mut T) -> PrivateKeywhere
T: CryptoRng + RngCore,
pub fn to_bytes(&self) -> [u8; 64]
pub fn as_bytes(&self) -> &[u8; 64]
pub fn sign(&self, message: Vec<u8>) -> [u8; 64]
Trait Implementations§
source§impl Clone for PrivateKey
impl Clone for PrivateKey
source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PrivateKey
impl Debug for PrivateKey
source§impl<'de> Deserialize<'de> for PrivateKey
impl<'de> Deserialize<'de> for PrivateKey
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a PrivateKey> for PublicKey
impl<'a> From<&'a PrivateKey> for PublicKey
source§fn from(private_key: &PrivateKey) -> PublicKey
fn from(private_key: &PrivateKey) -> PublicKey
Converts to this type from the input type.