Struct ethkey::Secret[][src]

pub struct Secret { /* fields omitted */ }

Methods

impl Secret
[src]

Creates a Secret from the given slice, returning None if the slice length != 32.

Creates zero key, which is invalid for crypto operations, but valid for math operation.

Imports and validates the key.

Checks validity of this key.

Inplace add one secret key to another (scalar + scalar)

Inplace subtract one secret key from another (scalar - scalar)

Inplace decrease secret key (scalar - 1)

Inplace multiply one secret key to another (scalar * scalar)

Inplace negate secret key (-scalar)

Inplace inverse secret key (1 / scalar)

Compute power of secret key inplace (secret ^ pow). This function is not intended to be used with large powers.

Create secp256k1::key::SecretKey based on this secret

Methods from Deref<Target = H256>

Copy the data of this object into some mutable slice of length len().

Returns true if all bits set in b are also set in self.

Returns true if no bits are set.

Returns the lowest 8 bytes interpreted as a BigEndian integer.

Deprecated

: Use LowerHex or Debug formatting instead.

Get a hex representation.

Trait Implementations

impl Clone for Secret
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Secret
[src]

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

This method tests for !=.

impl Eq for Secret
[src]

impl ToHex for Secret
[src]

Converts the value of self to a hex value, returning the owned string. Read more

impl LowerHex for Secret
[src]

Formats the value using the given formatter.

impl Debug for Secret
[src]

Formats the value using the given formatter. Read more

impl Display for Secret
[src]

Formats the value using the given formatter. Read more

impl FromStr for Secret
[src]

The associated error which can be returned from parsing.

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

impl From<[u8; 32]> for Secret
[src]

Performs the conversion.

impl From<H256> for Secret
[src]

Performs the conversion.

impl From<&'static str> for Secret
[src]

Performs the conversion.

impl From<SecretKey> for Secret
[src]

Performs the conversion.

impl Deref for Secret
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl Send for Secret

impl Sync for Secret