pub type UnencryptedToken<V, M, F = ()> = UnsealedToken<V, Local, M, F>;Expand description
An EncryptedToken that has been decrypted
Aliased Type§
pub struct UnencryptedToken<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> UnencryptedToken<V, M, F>
impl<V, M, F> UnencryptedToken<V, M, F>
Sourcepub fn encrypt(
self,
key: &LocalKey<V>,
) -> Result<EncryptedToken<V, M, F>, PasetoError>
pub fn encrypt( self, key: &LocalKey<V>, ) -> Result<EncryptedToken<V, M, F>, PasetoError>
Encrypt the token
Sourcepub fn encrypt_with_aad(
self,
key: &LocalKey<V>,
aad: &[u8],
) -> Result<EncryptedToken<V, M, F>, PasetoError>
pub fn encrypt_with_aad( self, key: &LocalKey<V>, aad: &[u8], ) -> Result<EncryptedToken<V, M, F>, PasetoError>
Encrypt the token, additionally authenticating the implicit assertions.