Struct sc_network::config::ed25519::SecretKey
pub struct SecretKey(_);
Expand description
An Ed25519 secret key.
Implementations§
§impl SecretKey
impl SecretKey
pub fn from_bytes(
sk_bytes: impl AsMut<[u8]>
) -> Result<SecretKey, DecodingError>
👎Deprecated since 0.2.0: This method name does not follow Rust naming conventions, use SecretKey::try_from_bytes
instead.
pub fn from_bytes( sk_bytes: impl AsMut<[u8]> ) -> Result<SecretKey, DecodingError>
SecretKey::try_from_bytes
instead.Create an Ed25519 secret key from a byte slice, zeroing the input on success. If the bytes do not constitute a valid Ed25519 secret key, an error is returned.
pub fn try_from_bytes(
sk_bytes: impl AsMut<[u8]>
) -> Result<SecretKey, DecodingError>
pub fn try_from_bytes( sk_bytes: impl AsMut<[u8]> ) -> Result<SecretKey, DecodingError>
Try to parse an Ed25519 secret key from a byte slice containing the actual key, zeroing the input on success. If the bytes do not constitute a valid Ed25519 secret key, an error is returned.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for Uwhere T: ToByteSlice, U: AsRef<[T]> + ?Sized,
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for Uwhere U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error>where T: FromByteSlice,
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ProtocolName for Twhere
T: AsRef<[u8]>,
impl<T> ProtocolName for Twhere T: AsRef<[u8]>,
§fn protocol_name(&self) -> &[u8] ⓘ
fn protocol_name(&self) -> &[u8] ⓘ
The protocol name as bytes. Transmitted on the network. Read more
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moresource§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
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
)source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.