Trait sp_core::crypto::Public[][src]

pub trait Public: AsRef<[u8]> + AsMut<[u8]> + Default + Derive + CryptoType + PartialEq + Eq + Clone + Send + Sync {
    fn from_slice(data: &[u8]) -> Self;
fn to_public_crypto_pair(&self) -> CryptoTypePublicPair; fn to_raw_vec(&self) -> Vec<u8>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... }
fn as_slice(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
{ ... } }

Trait suitable for typical cryptographic PKI key public type.

Required methods

fn from_slice(data: &[u8]) -> Self[src]

A new instance from the given slice.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

fn to_public_crypto_pair(&self) -> CryptoTypePublicPair[src]

Return CryptoTypePublicPair from public key.

Loading content...

Provided methods

fn to_raw_vec(&self) -> Vec<u8>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

Return a Vec<u8> filled with raw data.

fn as_slice(&self) -> &[u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Return a slice filled with raw data.

Loading content...

Implementors

impl Public for Dummy[src]

impl Public for sp_core::ecdsa::Public[src]

fn from_slice(data: &[u8]) -> Self[src]

A new instance from the given slice that should be 33 bytes long.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

impl Public for sp_core::ed25519::Public[src]

fn from_slice(data: &[u8]) -> Self[src]

A new instance from the given slice that should be 32 bytes long.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

impl Public for sp_core::sr25519::Public[src]

fn from_slice(data: &[u8]) -> Self[src]

A new instance from the given slice that should be 32 bytes long.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

Loading content...