[−][src]Trait sp_core::crypto::Public
Trait suitable for typical cryptographic PKI key public type.
Required methods
pub 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!
pub fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
[src]
Return CryptoTypePublicPair
from public key.
Provided methods
pub fn to_raw_vec(&self) -> Vec<u8>ⓘ
[src]
Return a Vec<u8>
filled with raw data.
pub fn as_slice(&self) -> &[u8]ⓘ
[src]
Return a slice filled with raw data.
Implementors
impl Public for Dummy
[src]
pub fn from_slice(_: &[u8]) -> Self
[src]
pub fn to_raw_vec(&self) -> Vec<u8>ⓘ
[src]
pub fn as_slice(&self) -> &[u8]ⓘ
[src]
pub fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
[src]
impl Public for sp_core::ecdsa::Public
[src]
pub 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!
pub fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
[src]
impl Public for sp_core::ed25519::Public
[src]
pub 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!
pub fn to_public_crypto_pair(&self) -> CryptoTypePublicPair
[src]
impl Public for sp_core::sr25519::Public
[src]
pub 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!