Struct exonum::crypto::SecretKey
[−]
[src]
pub struct SecretKey(_);
Ed25519 secret key used to create digital signatures over messages.
Examples
use exonum::crypto; let (_, secret_key) = crypto::gen_keypair();
Methods
impl SecretKey
[src]
impl SecretKey
[src]
pub fn new(ba: [u8; 64]) -> Self
[src]
Creates a new instance from bytes array.
pub fn from_slice(bs: &[u8]) -> Option<Self>
[src]
Creates a new instance from bytes slice.
pub fn to_hex(&self) -> String
[src]
Returns the hex representation of the binary data. Lower case letters are used (e.g. f9b4ca).
Trait Implementations
impl Clone for SecretKey
[src]
fn clone(&self) -> SecretKey
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for SecretKey
[src]
fn eq(&self, __arg_0: &SecretKey) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SecretKey) -> bool
[src]
This method tests for !=
.
impl Eq for SecretKey
[src]
impl Debug for SecretKey
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl ToHex for SecretKey
[src]
fn write_hex<W: Write>(&self, w: &mut W) -> Result
[src]
Writes the hex string representing self
into w
. Lower case letters are used (e.g. f9b4ca
). Read more
fn write_hex_upper<W: Write>(&self, w: &mut W) -> Result
[src]
Writes the hex string representing self
into w
. Upper case letters are used (e.g. F9B4CA
). Read more
impl FromHex for SecretKey
[src]
type Error = FromHexError
fn from_hex<T: AsRef<[u8]>>(v: T) -> Result<Self, Self::Error>
[src]
Creates an instance of type Self
from the given hex string, or fails with a custom error type. Read more
impl Serialize for SecretKey
[src]
fn serialize<S>(&self, ser: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for SecretKey
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Index<Range<usize>> for SecretKey
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: Range<usize>) -> &[u8]
[src]
Performs the indexing (container[index]
) operation.
impl Index<RangeTo<usize>> for SecretKey
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeTo<usize>) -> &[u8]
[src]
Performs the indexing (container[index]
) operation.
impl Index<RangeFrom<usize>> for SecretKey
[src]
type Output = [u8]
The returned type after indexing.
fn index(&self, _index: RangeFrom<usize>) -> &[u8]
[src]
Performs the indexing (container[index]
) operation.