Enum trust_dns::rr::dnssec::Algorithm
[−]
[src]
pub enum Algorithm {
RSASHA1,
RSASHA256,
RSASHA1NSEC3SHA1,
RSASHA512,
}Variants
RSASHA1DO NOT USE, SHA1 is a compromised hashing function, it is here for backward compatability
RSASHA256RSASHA1NSEC3SHA1DO NOT USE, SHA1 is a compromised hashing function, it is here for backward compatability
RSASHA512Methods
impl Algorithm[src]
fn sign(&self, private_key: &RSA, data: &[u8]) -> DnsSecResult<Vec<u8>>
fn verify(&self,
public_key: &RSA,
data: &[u8],
signature: &[u8])
-> DnsSecResult<()>
public_key: &RSA,
data: &[u8],
signature: &[u8])
-> DnsSecResult<()>
fn from_u8(value: u8) -> DecodeResult<Self>
fn hash_len(&self) -> usize
length in bytes that the hash portion of this function will produce
fn public_key_from_vec(&self, public_key: &[u8]) -> DecodeResult<RSA>
fn public_key_to_vec(&self, public_key: &RSA) -> Vec<u8>
Trait Implementations
impl Clone for Algorithm[src]
fn clone(&self) -> Algorithm
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Copy for Algorithm[src]
impl PartialEq for Algorithm[src]
fn eq(&self, __arg_0: &Algorithm) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl Eq for Algorithm[src]
impl Hash for Algorithm[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl PartialOrd for Algorithm[src]
fn partial_cmp(&self, __arg_0: &Algorithm) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Algorithm[src]
fn cmp(&self, __arg_0: &Algorithm) -> Ordering
This method returns an Ordering between self and other. Read more
impl Debug for Algorithm[src]
impl BinSerializable<Algorithm> for Algorithm[src]
fn read(decoder: &mut BinDecoder) -> DecodeResult<Algorithm>
fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult
impl FromStr for Algorithm[src]
type Err = DecodeError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> DecodeResult<Algorithm>
Parses a string s to return a value of this type. Read more