pub enum Algorithm {
Sha1,
Sha256,
Sha384,
Sha512,
}
Available on crate feature
tsig
only.Expand description
The supported TSIG algorithms.
Variants
Sha1
Sha256
Sha384
Sha512
Implementations
sourceimpl Algorithm
impl Algorithm
sourcepub fn from_dname<N: ToDname>(name: &N) -> Option<Self>
pub fn from_dname<N: ToDname>(name: &N) -> Option<Self>
Creates a value from its domain name representation.
Returns None
if the name doesn’t represent a known algorithm.
sourcepub fn native_len(self) -> usize
pub fn native_len(self) -> usize
Returns the native length of a signature created with this algorithm.
sourcepub fn within_len_bounds(self, len: usize) -> bool
pub fn within_len_bounds(self, len: usize) -> bool
Returns the bounds for the allowed signature size.
Trait Implementations
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralEq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnwindSafe for Algorithm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.