Struct exonum::crypto::Signature [] [src]

pub struct Signature(_);

Ed25519 digital signature.

Examples

use exonum::crypto;

let (public_key, secret_key) = crypto::gen_keypair();
let data = [1, 2, 3];
let signature = crypto::sign(&data, &secret_key);
assert!(crypto::verify(&signature, &data, &public_key));

Methods

impl Signature
[src]

[src]

Creates a new instance filled with zeros.

impl Signature
[src]

[src]

Creates a new instance from bytes array.

[src]

Creates a new instance from bytes slice.

[src]

Returns the hex representation of the binary data. Lower case letters are used (e.g. f9b4ca).

Trait Implementations

impl<'a> ExonumJson for &'a Signature
[src]

[src]

write deserialized field in buffer on place.

[src]

serialize field as json::Value

impl ExonumJsonDeserialize for Signature
[src]

[src]

deserialize json value.

impl<'a> Field<'a> for &'a Signature
[src]

[src]

Field's header size

[src]

Read Field from buffer, with given position, beware of memory unsafety, you should check Field before read. Read more

[src]

Write Field to buffer, in given position write doesn't lead to memory unsafety. Read more

[src]

Checks if data in the buffer could be deserialized. Returns an index of latest data seen. Read more

impl PartialEq for Signature
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Signature
[src]

impl Clone for Signature
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Signature
[src]

impl PartialOrd for Signature
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Signature
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for Signature
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl AsRef<[u8]> for Signature
[src]

Important traits for &'a mut [u8]
[src]

Performs the conversion.

impl FromStr for Signature
[src]

The associated error which can be returned from parsing.

[src]

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

impl ToString for Signature
[src]

[src]

Converts the given value to a String. Read more

impl Debug for Signature
[src]

[src]

Formats the value using the given formatter. Read more

impl FromHex for Signature
[src]

[src]

Creates an instance of type Self from the given hex string, or fails with a custom error type. Read more

impl Serialize for Signature
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for Signature
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Index<Range<usize>> for Signature
[src]

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

impl Index<RangeTo<usize>> for Signature
[src]

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

impl Index<RangeFrom<usize>> for Signature
[src]

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

impl Index<RangeFull> for Signature
[src]

The returned type after indexing.

Important traits for &'a mut [u8]
[src]

Performs the indexing (container[index]) operation.

Auto Trait Implementations

impl Send for Signature

impl Sync for Signature