Type Alias Ed25519PublicKey

Source
pub type Ed25519PublicKey = PublicKey<Ed25519, PUB_KEY_SIZE>;
Expand description

A public key for Ed25519 cryptographic operations.

This struct provides functionality to serialize the public key into both uncompressed and compressed formats. The public key is stored in uncompressed format (65 bytes) and can be converted to compressed format (33 bytes) when needed.

Aliased Type§

pub struct Ed25519PublicKey(pub(crate) [u8; 32], pub(crate) PhantomData<Ed25519>);

Tuple Fields§

§0: [u8; 32]§1: PhantomData<Ed25519>

Implementations§

Source§

impl Ed25519PublicKey

Source

pub const SIZE: usize = 32usize

The size of an Ed25519 public key in bytes.

Source

pub fn as_bytes(&self) -> &[u8; 32]

Returns the public key as a byte array.

Source

pub fn into_bytes(self) -> [u8; 32]

Consumes the public key and returns it as a byte array.