Struct libsecp256k1_rs::SecretKey[][src]

pub struct SecretKey(_);

Secret key (256-bit) on a secp256k1 curve.

Methods

impl SecretKey
[src]

Read a 32-byte array into a Secret key

Return the hexadecimal representation of the secret key

Create a new random secret key

Examples

extern crate rand;
extern crate libsecp256k1_rs as secp256k1;
use rand::thread_rng;
use secp256k1::SecretKey;

let k1 = SecretKey::random(&mut thread_rng());

Represent a SecretKey as a 32-byte array

Trait Implementations

impl Debug for SecretKey
[src]

Formats the value using the given formatter. Read more

impl Clone for SecretKey
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for SecretKey
[src]

impl Eq for SecretKey
[src]

impl PartialEq for SecretKey
[src]

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

This method tests for !=.

impl Display for SecretKey
[src]

Formats the value using the given formatter. Read more

impl Into<Scalar> for SecretKey
[src]

Performs the conversion.

impl Add for SecretKey
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub for SecretKey
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Mul<SecretKey> for SecretKey
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<PublicKey> for SecretKey
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Neg for SecretKey
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl From<SecretKey> for Message
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for SecretKey

impl Sync for SecretKey