Struct ethcore::account_provider::Signature
[−]
#[repr(C)]pub struct Signature(_);
Signature encoded as RSV components
Methods
impl Signature
impl Signature
pub fn r(&self) -> &[u8]
pub fn r(&self) -> &[u8]
Get a slice into the 'r' portion of the data.
pub fn s(&self) -> &[u8]
pub fn s(&self) -> &[u8]
Get a slice into the 's' portion of the data.
pub fn v(&self) -> u8
pub fn v(&self) -> u8
Get the recovery byte.
pub fn into_electrum(self) -> [u8; 65]
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]) -> Signature
pub fn from_electrum(data: &[u8]) -> Signature
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) -> Signature
pub fn from_rsv(r: &H256, s: &H256, v: u8) -> Signature
Create a signature object from the sig.
pub fn is_low_s(&self) -> bool
pub fn is_low_s(&self) -> bool
Check if this is a "low" signature.
pub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Check if each component of the signature is in range.
Trait Implementations
impl From<Signature> for H520
impl From<Signature> for H520
impl From<[u8; 65]> for Signature
impl From<[u8; 65]> for Signature
impl From<H520> for Signature
impl From<H520> for Signature
impl Clone for Signature
impl Clone for Signature
fn clone(&self) -> Signature
fn clone(&self) -> Signature
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 DerefMut for Signature
impl DerefMut for Signature
impl Into<[u8; 65]> for Signature
impl Into<[u8; 65]> for Signature
impl FromStr for Signature
impl FromStr for Signature
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Signature, <Signature as FromStr>::Err>
fn from_str(s: &str) -> Result<Signature, <Signature as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
impl Hash for Signature
impl Hash for Signature
fn hash<H>(&self, state: &mut H) where
H: Hasher,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
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 Eq for Signature
impl Eq for Signature
impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
fn eq(&self, other: &Signature) -> bool
fn eq(&self, other: &Signature) -> 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 Display for Signature
impl Display for Signature
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Deref for Signature
impl Deref for Signature
type Target = [u8; 65]
The resulting type after dereferencing.
fn deref(&self) -> &<Signature as Deref>::Target
fn deref(&self) -> &<Signature as Deref>::Target
Dereferences the value.
impl Debug for Signature
impl Debug for Signature
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Default for Signature
impl Default for Signature