Struct secp256k1_sys::PublicKey
source · #[repr(C)]pub struct PublicKey(_);
Expand description
Library-internal representation of a Secp256k1 public key
Implementations§
source§impl PublicKey
impl PublicKey
source§impl PublicKey
impl PublicKey
sourcepub unsafe fn new() -> Self
pub unsafe fn new() -> Self
Creates an “uninitialized” FFI public key which is zeroed out
Safety
If you pass this to any FFI functions, except as an out-pointer, the result is likely to be an assertation failure and process termination.
sourcepub unsafe fn from_array_unchecked(data: [c_uchar; 64]) -> Self
pub unsafe fn from_array_unchecked(data: [c_uchar; 64]) -> Self
Create a new public key usable for the FFI interface from raw bytes
Safety
Does not check the validity of the underlying representation. If it is invalid the result may be assertation failures (and process aborts) from the underlying library. You should not use this method except with data that you obtained from the FFI interface of the same version of this library.
sourcepub fn underlying_bytes(self) -> [c_uchar; 64]
pub fn underlying_bytes(self) -> [c_uchar; 64]
Returns the underlying FFI opaque representation of the public key
You should not use this unless you really know what you are doing. It is essentially only useful for extending the FFI interface itself.
Trait Implementations§
source§impl Ord for PublicKey
impl Ord for PublicKey
source§impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
source§impl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more