/** * Attempt to acquire parameters from the given key. * * @param key the key (must not be {@code null}) * @return the parameters, or {@code null} if no known parameters are available */ public static AlgorithmParameterSpec getParameters(Key key) { return getParameters(key, AlgorithmParameterSpec.class); }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(publicKey, paramSpecClass); }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(secretKey, paramSpecClass) != null; }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(secretKey, paramSpecClass); }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(publicKey, paramSpecClass) != null; }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(keyPair.getPublic(), paramSpecClass); }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(keyPair.getPublic(), paramSpecClass) != null; }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(getFirstCertificate().getPublicKey(), paramSpecClass); }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(getFirstCertificate().getPublicKey(), paramSpecClass) != null; }
/** * Attempt to determine if the two keys have the same parameters. This method returns {@code true} if the keys * definitely have the same parameters, or {@code false} if they do not or if parameter equivalency cannot be determined. * * @param key1 the first key (must not be {@code null}) * @param key2 the second key (must not be {@code null}) * @return {@code true} if the parameters are definitely equal, {@code false} otherwise */ public static boolean hasSameParameters(final Key key1, final Key key2) { Assert.checkNotNullParam("key1", key1); Assert.checkNotNullParam("key2", key2); final AlgorithmParameterSpec param1 = getParameters(key1, AlgorithmParameterSpec.class); final AlgorithmParameterSpec param2 = getParameters(key2, AlgorithmParameterSpec.class); return param1 == null && param2 == null || param1 != null && param2 != null && parametersEqual(param1, param2); }
/** * Determine if the given key has parameters which match the given parameters. * * @param key the key (must not be {@code null}) * @param parameters the parameters (must not be {@code null}) * @return {@code true} if the parameters match, {@code false} otherwise */ public static boolean hasParameters(final Key key, final AlgorithmParameterSpec parameters) { Assert.checkNotNullParam("key", key); Assert.checkNotNullParam("parameters", parameters); final AlgorithmParameterSpec keyParameters = getParameters(key, AlgorithmParameterSpec.class); return keyParameters != null && parametersEqual(keyParameters, parameters); }
/** * Attempt to acquire parameters from the given key. * * @param key the key (must not be {@code null}) * @return the parameters, or {@code null} if no known parameters are available */ public static AlgorithmParameterSpec getParameters(Key key) { return getParameters(key, AlgorithmParameterSpec.class); }
/** * Attempt to acquire parameters from the given key. * * @param key the key (must not be {@code null}) * @return the parameters, or {@code null} if no known parameters are available */ public static AlgorithmParameterSpec getParameters(Key key) { return getParameters(key, AlgorithmParameterSpec.class); }
/** * Attempt to acquire parameters from the given key. * * @param key the key (must not be {@code null}) * @return the parameters, or {@code null} if no known parameters are available */ public static AlgorithmParameterSpec getParameters(Key key) { return getParameters(key, AlgorithmParameterSpec.class); }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(secretKey, paramSpecClass) != null; }
public boolean supportsParameters(final Class<? extends AlgorithmParameterSpec> paramSpecClass) { return KeyUtil.getParameters(publicKey, paramSpecClass) != null; }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(keyPair.getPublic(), paramSpecClass); }
public <P extends AlgorithmParameterSpec> P getParameters(final Class<P> paramSpecClass) { return KeyUtil.getParameters(getFirstCertificate().getPublicKey(), paramSpecClass); }
/** * Determine if the given key has parameters which match the given parameters. * * @param key the key (must not be {@code null}) * @param parameters the parameters (must not be {@code null}) * @return {@code true} if the parameters match, {@code false} otherwise */ public static boolean hasParameters(final Key key, final AlgorithmParameterSpec parameters) { Assert.checkNotNullParam("key", key); Assert.checkNotNullParam("parameters", parameters); final AlgorithmParameterSpec keyParameters = getParameters(key, AlgorithmParameterSpec.class); return keyParameters != null && parametersEqual(keyParameters, parameters); }
/** * Determine if the given key has parameters which match the given parameters. * * @param key the key (must not be {@code null}) * @param parameters the parameters (must not be {@code null}) * @return {@code true} if the parameters match, {@code false} otherwise */ public static boolean hasParameters(final Key key, final AlgorithmParameterSpec parameters) { Assert.checkNotNullParam("key", key); Assert.checkNotNullParam("parameters", parameters); final AlgorithmParameterSpec keyParameters = getParameters(key, AlgorithmParameterSpec.class); return keyParameters != null && parametersEqual(keyParameters, parameters); }