/** * Returns quietly if the specified key is allowed to verify signatures using this algorithm * according to the <a href="https://tools.ietf.org/html/rfc7518">JWT JWA Specification (RFC 7518)</a> or throws an * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. * * @param key the key to check for validity. * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. * @since 0.10.0 */ public void assertValidVerificationKey(Key key) throws InvalidKeyException { assertValid(key, false); }
/** * Returns quietly if the specified key is allowed to create signatures using this algorithm * according to the <a href="https://tools.ietf.org/html/rfc7518">JWT JWA Specification (RFC 7518)</a> or throws an * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. * * @param key the key to check for validity. * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. * @since 0.10.0 */ public void assertValidSigningKey(Key key) throws InvalidKeyException { assertValid(key, true); }
/** * Returns quietly if the specified key is allowed to verify signatures using this algorithm * according to the <a href="https://tools.ietf.org/html/rfc7518">JWT JWA Specification (RFC 7518)</a> or throws an * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. * * @param key the key to check for validity. * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. * @since 0.10.0 */ public void assertValidVerificationKey(Key key) throws InvalidKeyException { assertValid(key, false); }
/** * Returns quietly if the specified key is allowed to create signatures using this algorithm * according to the <a href="https://tools.ietf.org/html/rfc7518">JWT JWA Specification (RFC 7518)</a> or throws an * {@link InvalidKeyException} if the key is not allowed or not secure enough for this algorithm. * * @param key the key to check for validity. * @throws InvalidKeyException if the key is not allowed or not secure enough for this algorithm. * @since 0.10.0 */ public void assertValidSigningKey(Key key) throws InvalidKeyException { assertValid(key, true); }