#[repr(transparent)]pub struct P256UncompressedPublicKey(pub [u8; 64]);Expand description
Uncompressed P256 public key without leading SEC-1 tag byte.
Tuple Fields§
§0: [u8; 64]Implementations§
Source§impl P256UncompressedPublicKey
impl P256UncompressedPublicKey
Sourcepub fn compress(&self) -> P256CompressedPublicKey
pub fn compress(&self) -> P256CompressedPublicKey
Compress public key
§Examples
assert_eq!(
P256UncompressedPublicKey(hex!("beed8cb2c3622dd5f1ee641f12d88e35f3fb8c6ae081d689008bdaa6af38d4408e9c469c5ca7b59927606ef9ea34ee2335e85dbeaa265ca038b5e2896f34ded0"))
.compress()
.0,
hex!("02beed8cb2c3622dd5f1ee641f12d88e35f3fb8c6ae081d689008bdaa6af38d440"),
);Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for P256UncompressedPublicKey
impl<'arbitrary> Arbitrary<'arbitrary> for P256UncompressedPublicKey
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§impl AsRef<[u8]> for P256UncompressedPublicKey
impl AsRef<[u8]> for P256UncompressedPublicKey
Source§impl BorshDeserialize for P256UncompressedPublicKey
impl BorshDeserialize for P256UncompressedPublicKey
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSchema for P256UncompressedPublicKey
impl BorshSchema for P256UncompressedPublicKey
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Source§fn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type.
Type definition partially explains how to serialize/deserialize a type.
Source§impl BorshSerialize for P256UncompressedPublicKey
impl BorshSerialize for P256UncompressedPublicKey
Source§impl Clone for P256UncompressedPublicKey
impl Clone for P256UncompressedPublicKey
Source§fn clone(&self) -> P256UncompressedPublicKey
fn clone(&self) -> P256UncompressedPublicKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for P256UncompressedPublicKey
impl Debug for P256UncompressedPublicKey
Source§impl<'de> Deserialize<'de> for P256UncompressedPublicKey
impl<'de> Deserialize<'de> for P256UncompressedPublicKey
Source§fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for P256UncompressedPublicKey
impl Display for P256UncompressedPublicKey
Source§impl<'__derive_more_into> From<&'__derive_more_into P256UncompressedPublicKey> for &'__derive_more_into [u8; 64]
impl<'__derive_more_into> From<&'__derive_more_into P256UncompressedPublicKey> for &'__derive_more_into [u8; 64]
Source§fn from(value: &'__derive_more_into P256UncompressedPublicKey) -> Self
fn from(value: &'__derive_more_into P256UncompressedPublicKey) -> Self
Converts to this type from the input type.
Source§impl From<&P256UncompressedPublicKey> for P256CompressedPublicKey
impl From<&P256UncompressedPublicKey> for P256CompressedPublicKey
Source§fn from(value: &P256UncompressedPublicKey) -> Self
fn from(value: &P256UncompressedPublicKey) -> Self
Compress a public key
Source§impl From<&VerifyingKey<NistP256>> for P256UncompressedPublicKey
impl From<&VerifyingKey<NistP256>> for P256UncompressedPublicKey
Source§impl From<P256UncompressedPublicKey> for [u8; 64]
impl From<P256UncompressedPublicKey> for [u8; 64]
Source§fn from(value: P256UncompressedPublicKey) -> Self
fn from(value: P256UncompressedPublicKey) -> Self
Converts to this type from the input type.
Source§impl From<P256UncompressedPublicKey> for P256CompressedPublicKey
impl From<P256UncompressedPublicKey> for P256CompressedPublicKey
Source§fn from(value: P256UncompressedPublicKey) -> Self
fn from(value: P256UncompressedPublicKey) -> Self
Compress a public key
Source§impl From<VerifyingKey<NistP256>> for P256UncompressedPublicKey
impl From<VerifyingKey<NistP256>> for P256UncompressedPublicKey
Source§impl FromStr for P256UncompressedPublicKey
impl FromStr for P256UncompressedPublicKey
Source§impl Hash for P256UncompressedPublicKey
impl Hash for P256UncompressedPublicKey
Source§impl JsonSchema for P256UncompressedPublicKey
impl JsonSchema for P256UncompressedPublicKey
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for P256UncompressedPublicKey
impl Ord for P256UncompressedPublicKey
Source§fn cmp(&self, other: &P256UncompressedPublicKey) -> Ordering
fn cmp(&self, other: &P256UncompressedPublicKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for P256UncompressedPublicKey
impl PartialEq for P256UncompressedPublicKey
Source§fn eq(&self, other: &P256UncompressedPublicKey) -> bool
fn eq(&self, other: &P256UncompressedPublicKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for P256UncompressedPublicKey
impl PartialOrd for P256UncompressedPublicKey
Source§impl Serialize for P256UncompressedPublicKeywhere
Self: Display,
impl Serialize for P256UncompressedPublicKeywhere
Self: Display,
Source§impl TryFrom<&P256UncompressedPublicKey> for VerifyingKey
impl TryFrom<&P256UncompressedPublicKey> for VerifyingKey
Source§impl TryFrom<P256UncompressedPublicKey> for VerifyingKey
impl TryFrom<P256UncompressedPublicKey> for VerifyingKey
impl Copy for P256UncompressedPublicKey
impl Eq for P256UncompressedPublicKey
impl StructuralPartialEq for P256UncompressedPublicKey
Auto Trait Implementations§
impl Freeze for P256UncompressedPublicKey
impl RefUnwindSafe for P256UncompressedPublicKey
impl Send for P256UncompressedPublicKey
impl Sync for P256UncompressedPublicKey
impl Unpin for P256UncompressedPublicKey
impl UnsafeUnpin for P256UncompressedPublicKey
impl UnwindSafe for P256UncompressedPublicKey
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)