Skip to content

Commit

Permalink
Update src/core/metadata/parameters/verifier.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob <[email protected]>
  • Loading branch information
Ryanmtate and cobward authored Nov 21, 2024
1 parent 55b36f9 commit 92eeb53
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/core/metadata/parameters/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ use serde_json::{Map, Value as Json};
pub struct VpFormats(pub ClaimFormatMap);

impl VpFormats {
/// Returns a boolean to denote whether the format and cryptosuite provided
/// are supported in the VP formats.
/// Returns a boolean to denote whether a particular pair of format and security method
/// are supported in the VP formats. A security method could be a JOSE algorithm, a COSE
/// algorithm, a Cryptosuite, etc.
///
/// NOTE: This method is interested in the cryptosuite of the claim format
/// NOTE: This method is interested in the security method of the claim format
/// payload and not the claim format designation.
///
/// For example, the cryptosuite would need to match one of the `alg`
/// For example, the security method would need to match one of the `alg`
/// values in the claim format payload.
pub fn supports_cryptosuite(
pub fn supports_security_method(
&self,
format: &ClaimFormatDesignation,
cryptosuite: &String,
security_method: &String,
) -> bool {
match self.0.get(format) {
Some(ClaimFormatPayload::Alg(alg_values))
Expand Down

0 comments on commit 92eeb53

Please sign in to comment.