Struct secp256k1_test::key::PublicKey
[−]
[src]
pub struct PublicKey(_);
A Secp256k1 public key, used for verification of signatures
Methods
impl PublicKey
[src]
fn new() -> PublicKey
[src]
Creates a new zeroed out public key
fn is_valid(&self) -> bool
[src]
Determines whether a pubkey is valid
fn as_ptr(&self) -> *const PublicKey
[src]
Obtains a raw pointer suitable for use with FFI functions
fn from_secret_key(secp: &Secp256k1, sk: &SecretKey) -> Result<PublicKey, Error>
[src]
Creates a new public key from a secret key.
fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<PublicKey, Error>
[src]
Creates a public key directly from a slice
fn serialize_vec(
&self,
secp: &Secp256k1,
compressed: bool
) -> ArrayVec<[u8; 72]>
[src]
&self,
secp: &Secp256k1,
compressed: bool
) -> ArrayVec<[u8; 72]>
Serialize the key as a byte-encoded pair of values. In compressed form the y-coordinate is represented by only a single bit, as x determines it up to one bit.
fn add_exp_assign(
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Adds the pk corresponding to other
to the pk self
in place
fn mul_assign(
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Muliplies the pk self
in place by the scalar other
Trait Implementations
impl Copy for PublicKey
[src]
impl Clone for PublicKey
[src]
fn clone(&self) -> PublicKey
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for PublicKey
[src]
fn eq(&self, __arg_0: &PublicKey) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PublicKey) -> bool
[src]
This method tests for !=
.
impl Eq for PublicKey
[src]
impl Debug for PublicKey
[src]
impl Hash for PublicKey
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Decodable for PublicKey
[src]
fn decode<D: Decoder>(d: &mut D) -> Result<PublicKey, D::Error>
[src]
Deserialize a value using a Decoder
.
impl From<PublicKey> for PublicKey
[src]
Creates a new public key from a FFI public key
impl Encodable for PublicKey
[src]
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>
[src]
Serialize a value using an Encoder
.
impl<'de> Deserialize<'de> for PublicKey
[src]
fn deserialize<D>(d: D) -> Result<PublicKey, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more