Struct scrypto::prelude::radix_engine_common::crypto::Secp256k1PrivateKey
source · pub struct Secp256k1PrivateKey(SecretKey);
Tuple Fields§
§0: SecretKey
Implementations§
source§impl Secp256k1PrivateKey
impl Secp256k1PrivateKey
pub const LENGTH: usize = 32usize
pub fn public_key(&self) -> Secp256k1PublicKey
pub fn sign(&self, msg_hash: &impl IsHash) -> Secp256k1Signature
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_hex(&self) -> String
pub fn from_hex(s: &str) -> Result<Secp256k1PrivateKey, ()>
pub fn from_bytes(slice: &[u8]) -> Result<Secp256k1PrivateKey, ()>
pub fn from_u64(n: u64) -> Result<Secp256k1PrivateKey, ()>
Auto Trait Implementations§
impl RefUnwindSafe for Secp256k1PrivateKey
impl Send for Secp256k1PrivateKey
impl Sync for Secp256k1PrivateKey
impl Unpin for Secp256k1PrivateKey
impl UnwindSafe for Secp256k1PrivateKey
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more