polyhash/
experimental.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Experimental features NOT covered by semver.

#![cfg(feature = "experimental")]
#![cfg_attr(docsrs, doc(cfg(feature = "experimental")))]

pub use super::poly::State;
use super::poly::{Polyval, Sealed, Tag};

impl Polyval {
    /// Exports the current state.
    #[inline]
    pub fn export(&self) -> State {
        self.0.export()
    }

    /// Resets the hash to `state`.
    #[inline]
    pub fn reset(&mut self, state: &State) {
        self.0.reset(state)
    }

    /// Returns the current authentication tag without consuming
    /// `self`.
    #[inline]
    pub fn current_tag(&self) -> Tag {
        self.0.tag()
    }
}