Struct ethcore::account_provider::Signature
[−]
#[repr(C)]pub struct Signature(_);
Signature encoded as RSV components
Methods
impl Signature
impl Signaturepub 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) -> u8Get 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]) -> SignatureParse 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) -> SignatureCreate a signature object from the sig.
pub fn is_low_s(&self) -> bool
pub fn is_low_s(&self) -> boolCheck if this is a "low" signature.
pub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> boolCheck if each component of the signature is in range.
Trait Implementations
impl From<Signature> for H520
impl From<Signature> for H520impl From<[u8; 65]> for Signature
impl From<[u8; 65]> for Signatureimpl From<H520> for Signature
impl From<H520> for Signatureimpl Clone for Signature
impl Clone for Signaturefn clone(&self) -> Signature
fn clone(&self) -> SignatureReturns 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 Signatureimpl Into<[u8; 65]> for Signature
impl Into<[u8; 65]> for Signatureimpl FromStr for Signature
impl FromStr for Signaturetype 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 Signaturefn 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 Signatureimpl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signaturefn eq(&self, other: &Signature) -> bool
fn eq(&self, other: &Signature) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Display for Signature
impl Display for Signaturefn 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 Signaturetype Target = [u8; 65]
The resulting type after dereferencing.
fn deref(&self) -> &<Signature as Deref>::Target
fn deref(&self) -> &<Signature as Deref>::TargetDereferences the value.
impl Debug for Signature
impl Debug for Signaturefn 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