Struct secp256k1zkp::key::SecretKey [−][src]
Secret 256-bit key used as x
in an ECDSA signature
Implementations
impl SecretKey
[src]
impl SecretKey
[src]pub fn as_ptr(&self) -> *const u8
[src]
Converts the object to a raw pointer for FFI interfacing
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
Converts the object to a mutable raw pointer for FFI interfacing
pub fn len(&self) -> usize
[src]
Returns the length of the object as an array
pub fn is_empty(&self) -> bool
[src]
Returns whether the object as an array is empty
impl SecretKey
[src]
impl SecretKey
[src]pub fn new<R: Rng>(secp: &Secp256k1, rng: &mut R) -> SecretKey
[src]
Creates a new random secret key
pub fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<SecretKey, Error>
[src]
Converts a SECRET_KEY_SIZE
-byte slice to a secret key
pub fn add_assign(
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Adds one secret key to another, modulo the curve order
pub fn mul_assign(
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Multiplies one secret key by another, modulo the curve order
pub fn inv_assign(&mut self, secp: &Secp256k1) -> Result<(), Error>
[src]
Inverses the secret key
pub fn neg_assign(&mut self, secp: &Secp256k1) -> Result<(), Error>
[src]
Negates the secret key
Trait Implementations
impl<'de> Deserialize<'de> for SecretKey
[src]
impl<'de> Deserialize<'de> for SecretKey
[src]fn deserialize<D>(d: D) -> Result<SecretKey, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl PartialOrd<SecretKey> for SecretKey
[src]
impl PartialOrd<SecretKey> for SecretKey
[src]Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl RefUnwindSafe for SecretKey
impl UnwindSafe for SecretKey
impl UnwindSafe for SecretKey
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]