pub struct PublicKey<T, const N: usize>(pub(crate) [u8; N], pub(crate) PhantomData<T>);Expand description
A public key base type
Tuple Fields§
§0: [u8; N]§1: PhantomData<T>Implementations§
Source§impl PublicKey<Ecdsa, UNCOMPRESSED_PUB_KEY_SIZE>
impl PublicKey<Ecdsa, UNCOMPRESSED_PUB_KEY_SIZE>
Sourcepub const COMPRESSED_SIZE: usize = 33usize
pub const COMPRESSED_SIZE: usize = 33usize
The size of a compressed ECDSA public key in bytes.
Sourcepub fn uncompressed(&self) -> [u8; 65]
pub fn uncompressed(&self) -> [u8; 65]
Returns the uncompressed public key as a byte array.
Sourcepub fn compressed(&self) -> [u8; 33]
pub fn compressed(&self) -> [u8; 33]
Returns the compressed public key as a byte array.
Trait Implementations§
impl<T: Eq, const N: usize> Eq for PublicKey<T, N>
impl<T, const N: usize> StructuralPartialEq for PublicKey<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for PublicKey<T, N>
impl<T, const N: usize> RefUnwindSafe for PublicKey<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for PublicKey<T, N>where
T: Send,
impl<T, const N: usize> Sync for PublicKey<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for PublicKey<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for PublicKey<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§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