Struct ethkey::Signature [−][src]
#[repr(C)]pub struct Signature(_);
Signature encoded as RSV components
Methods
impl Signature
[src]
impl Signature
pub fn r(&self) -> &[u8]
[src]
pub fn r(&self) -> &[u8]
Get a slice into the 'r' portion of the data.
pub fn s(&self) -> &[u8]
[src]
pub fn s(&self) -> &[u8]
Get a slice into the 's' portion of the data.
pub fn v(&self) -> u8
[src]
pub fn v(&self) -> u8
Get the recovery byte.
pub fn into_electrum(self) -> [u8; 65]
[src]
pub fn into_electrum(self) -> [u8; 65]
Encode the signature into RSV array (V altered to be in "Electrum" notation).
pub fn from_electrum(data: &[u8]) -> Self
[src]
pub fn from_electrum(data: &[u8]) -> Self
Parse bytes as a signature encoded as RSV (V in "Electrum" notation). May return empty (invalid) signature if given data has invalid length.
pub fn from_rsv(r: &H256, s: &H256, v: u8) -> Self
[src]
pub fn from_rsv(r: &H256, s: &H256, v: u8) -> Self
Create a signature object from the sig.
pub fn is_low_s(&self) -> bool
[src]
pub fn is_low_s(&self) -> bool
Check if this is a "low" signature.
pub fn is_valid(&self) -> bool
[src]
pub fn is_valid(&self) -> bool
Check if each component of the signature is in range.
Trait Implementations
impl PartialEq for Signature
[src]
impl PartialEq for Signature
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Signature
[src]
impl Eq for Signature
impl Debug for Signature
[src]
impl Debug for Signature
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Display for Signature
[src]
impl Display for Signature
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl FromStr for Signature
[src]
impl FromStr for Signature
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Default for Signature
[src]
impl Default for Signature
impl Hash for Signature
[src]
impl Hash for Signature
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Signature
[src]
impl Clone for Signature
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl From<[u8; 65]> for Signature
[src]
impl From<[u8; 65]> for Signature
impl Into<[u8; 65]> for Signature
[src]
impl Into<[u8; 65]> for Signature
impl From<Signature> for H520
[src]
impl From<Signature> for H520
impl From<H520> for Signature
[src]
impl From<H520> for Signature
impl Deref for Signature
[src]
impl Deref for Signature
type Target = [u8; 65]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl DerefMut for Signature
[src]
impl DerefMut for Signature