Struct ethkey::Signature [−][src]
#[repr(C)]pub struct Signature(_);
Signature encoded as RSV components
Methods
impl Signature[src]
impl Signaturepub 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) -> u8Get 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]) -> SelfParse 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) -> SelfCreate a signature object from the sig.
pub fn is_low_s(&self) -> bool[src]
pub fn is_low_s(&self) -> boolCheck if this is a "low" signature.
pub fn is_valid(&self) -> bool[src]
pub fn is_valid(&self) -> boolCheck if each component of the signature is in range.
Trait Implementations
impl PartialEq for Signature[src]
impl PartialEq for Signaturefn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> 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 Eq for Signature[src]
impl Eq for Signatureimpl Debug for Signature[src]
impl Debug for Signaturefn 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 Signaturefn 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 Signaturetype 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 Signatureimpl Hash for Signature[src]
impl Hash for Signaturefn 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 Signaturefn clone(&self) -> Self[src]
fn clone(&self) -> SelfReturns 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 Signatureimpl Into<[u8; 65]> for Signature[src]
impl Into<[u8; 65]> for Signatureimpl From<Signature> for H520[src]
impl From<Signature> for H520impl From<H520> for Signature[src]
impl From<H520> for Signatureimpl Deref for Signature[src]
impl Deref for Signaturetype Target = [u8; 65]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
fn deref(&self) -> &Self::TargetDereferences the value.
impl DerefMut for Signature[src]
impl DerefMut for Signature