#[repr(u8)]pub enum Tag {
Identity = 0,
CompressedEvenY = 2,
CompressedOddY = 3,
Uncompressed = 4,
Compact = 5,
}
Expand description
Tag byte used by the Elliptic-Curve-Point-to-Octet-String
encoding.
Variants§
Identity = 0
Identity point (0x00
)
CompressedEvenY = 2
Compressed point with even y-coordinate (0x02
)
CompressedOddY = 3
Compressed point with odd y-coordinate (0x03
)
Uncompressed = 4
Uncompressed point (0x04
)
Compact = 5
Compact point (0x05
)
Implementations§
source§impl Tag
impl Tag
sourcepub fn is_compact(self) -> bool
pub fn is_compact(self) -> bool
Is this point compact?
sourcepub fn is_compressed(self) -> bool
pub fn is_compressed(self) -> bool
Is this point compressed?
sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Is this point the identity point?
sourcepub fn message_len(self, field_element_size: usize) -> usize
pub fn message_len(self, field_element_size: usize) -> usize
Compute the expected total message length for a message prefixed with this tag (including the tag byte), given the field element size (in bytes) for a particular elliptic curve.
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)