Trait DecryptVerify

Source
pub trait DecryptVerify {
    // Provided methods
    fn decrypt(
        &self,
        value: &Value,
        secret_key: &Jwk,
    ) -> Result<JwtPayload, TrustchainCRError> { ... }
    fn decrypt_and_verify(
        &self,
        input: String,
        secret_key: &Jwk,
        public_key: &Jwk,
    ) -> Result<JwtPayload, TrustchainCRError> { ... }
}
Expand description

Interface for decrypting and then verifying data.

Provided Methods§

Source

fn decrypt( &self, value: &Value, secret_key: &Jwk, ) -> Result<JwtPayload, TrustchainCRError>

Decrypts a payload with a secret key.

Source

fn decrypt_and_verify( &self, input: String, secret_key: &Jwk, public_key: &Jwk, ) -> Result<JwtPayload, TrustchainCRError>

Wrapper function that combines decrypting a payload with a secret key and then verifying it with a public key.

Implementors§