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

RSASHA256
RSASHA1NSEC3SHA1

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

RSASHA512

Methods

impl Algorithm

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 BinSerializable<Algorithm> for Algorithm

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

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

impl From<&'static str> for Algorithm

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

Derived Implementations

impl Debug for Algorithm

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

impl Ord for Algorithm

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

impl PartialOrd for Algorithm

fn partial_cmp(&self, __arg_0: &Algorithm) -> Option<Ordering>

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

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

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

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

impl Hash for Algorithm

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for Algorithm

impl PartialEq for Algorithm

fn eq(&self, __arg_0: &Algorithm) -> bool

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

impl Copy for Algorithm

impl Clone for Algorithm

fn clone(&self) -> Algorithm

1.0.0fn clone_from(&mut self, source: &Self)