Interface GenericJcaSignatureContext.VerifyLengthResolver
- Enclosing class:
GenericJcaSignatureContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy for determining the expected signature length in VERIFY mode.
The resolver is evaluated during construction and should return the fixed tag length for verification.
-
Method Summary
Modifier and TypeMethodDescriptionfixed(int len) Returns a resolver that always reports a fixed length.intResolves the expected signature length for a given public key in VERIFY mode.
-
Method Details
-
resolve
Resolves the expected signature length for a given public key in VERIFY mode.- Parameters:
publicKey- public key used for verification- Returns:
- exact number of bytes expected in the verification tag
- Throws:
GeneralSecurityException- if the length cannot be determined
-
fixed
Returns a resolver that always reports a fixed length.- Parameters:
len- positive length in bytes- Returns:
- resolver returning
len - Throws:
IllegalArgumentException- iflen<= 0
-