Enum trust_dns::rr::dnssec::Algorithm [] [src]

pub enum Algorithm {
    RSASHA1,
    RSASHA256,
    RSASHA1NSEC3SHA1,
    RSASHA512,
}

Variants

RSASHA1

DO NOT USE, SHA1 is a compromised hashing function, it is here for backward compatability

RSASHA256RSASHA1NSEC3SHA1

DO NOT USE, SHA1 is a compromised hashing function, it is here for backward compatability

RSASHA512

Methods

impl Algorithm
[src]

fn sign(&self, private_key: &PKey, data: &[u8]) -> Vec<u8>

fn verify(&self, public_key: &PKey, data: &[u8], signature: &[u8]) -> bool

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<PKey>

fn public_key_to_vec(&self, public_key: &PKey) -> Vec<u8>

Trait Implementations

impl Debug for Algorithm
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Ord for Algorithm
[src]

fn cmp(&self, __arg_0: &Algorithm) -> Ordering

This method returns an Ordering between self and other. Read more

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) -> bool
1.0.0

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &Rhs) -> bool
1.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) -> bool
1.0.0

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Eq 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) -> bool
1.0.0

This method tests for !=.

impl Copy for Algorithm
[src]

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 BinSerializable<Algorithm> for Algorithm
[src]

fn read(decoder: &mut BinDecoder) -> DecodeResult<Algorithm>

fn emit(&self, encoder: &mut BinEncoder) -> EncodeResult

impl From<&'static str> for Algorithm
[src]

fn from(s: &'static str) -> Algorithm

Performs the conversion.