pub type UnsignedToken<V, M, F = ()> = UnsealedToken<V, Public, M, F>;Expand description
A SignedToken that has been verified
Aliased Type§
pub struct UnsignedToken<V, M, F = ()> {
pub claims: M,
pub footer: F,
/* private fields */
}Fields§
§claims: MThe message that was contained in the token
The footer that was sent with the token
Implementations§
Source§impl<V, M, F> UnsignedToken<V, M, F>
impl<V, M, F> UnsignedToken<V, M, F>
Sourcepub fn sign(
self,
key: &SecretKey<V>,
) -> Result<SignedToken<V, M, F>, PasetoError>
pub fn sign( self, key: &SecretKey<V>, ) -> Result<SignedToken<V, M, F>, PasetoError>
Sign the token
Sourcepub fn sign_with_aad(
self,
key: &SecretKey<V>,
aad: &[u8],
) -> Result<SignedToken<V, M, F>, PasetoError>
pub fn sign_with_aad( self, key: &SecretKey<V>, aad: &[u8], ) -> Result<SignedToken<V, M, F>, PasetoError>
Sign the token, additionally authenticating the implicit assertions.