sui_types::crypto

Type Alias NetworkKeyPair

Source
pub type NetworkKeyPair = Ed25519KeyPair;

Aliased Type§

struct NetworkKeyPair { /* private fields */ }

Trait Implementations

§

impl AsRef<[u8]> for Ed25519KeyPair

§

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

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Debug for Ed25519KeyPair

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Ed25519KeyPair

§

fn deserialize<D>( deserializer: D, ) -> Result<Ed25519KeyPair, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<Ed25519PrivateKey> for Ed25519KeyPair

§

fn from(private: Ed25519PrivateKey) -> Ed25519KeyPair

Converts to this type from the input type.
§

impl From<SigningKey> for Ed25519KeyPair

§

fn from(kp: SigningKey) -> Ed25519KeyPair

Converts to this type from the input type.
§

impl FromStr for Ed25519KeyPair

§

type Err = FastCryptoError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Ed25519KeyPair, <Ed25519KeyPair as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl KeyPair for Ed25519KeyPair

§

type PubKey = Ed25519PublicKey

§

type PrivKey = Ed25519PrivateKey

§

type Sig = Ed25519Signature

§

fn public(&self) -> &<Ed25519KeyPair as KeyPair>::PubKey

Get the public key.
§

fn private(self) -> <Ed25519KeyPair as KeyPair>::PrivKey

Get the private key.
§

fn copy(&self) -> Ed25519KeyPair

§

fn generate<R>(rng: &mut R) -> Ed25519KeyPair
where R: AllowedRng,

Generate a new keypair using the given RNG.
§

impl PartialEq for Ed25519KeyPair

§

fn eq(&self, other: &Ed25519KeyPair) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for Ed25519KeyPair

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Signer<Ed25519Signature> for Ed25519KeyPair

§

fn sign(&self, msg: &[u8]) -> Ed25519Signature

Create a new signature over a message.
Source§

impl Signer<Signature> for Ed25519KeyPair

Source§

fn sign(&self, msg: &[u8]) -> Signature

Create a new signature over a message.
§

impl ToFromBytes for Ed25519KeyPair

The bytes form of the keypair always only contain the private key bytes

§

fn from_bytes(bytes: &[u8]) -> Result<Ed25519KeyPair, FastCryptoError>

Parse an object from its byte representation
§

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

Borrow a byte slice representing the serialized form of this object
§

impl Eq for Ed25519KeyPair

§

impl StructuralPartialEq for Ed25519KeyPair