/** * Implementation of the {@code engineGetEncoded} method. * * @return the encoded representation (not {@code null}) */ protected final byte[] engineGetEncoded() { checkInit(); return encoded; }
/** * Implementation of the {@code engineGetEncoded} method. * * @param format the format string (must not be {@code null}) * @return the encoded representation (not {@code null}) * @throws IOException if the given format is not {@code ASN.1} */ protected final byte[] engineGetEncoded(final String format) throws IOException { checkInit(); if ("ASN.1".equalsIgnoreCase(format)) { return engineGetEncoded(); } else { throw log.invalidFormat("ASN.1", format); } }
/** * Implementation of the {@code engineGetParameterSpec} method. * * @param type the parameter specification type class (must not be {@code null}) * @param <T> the parameter specification type * @return the parameter specification (must not be {@code null}) * @throws InvalidParameterSpecException if the type is not supported */ protected final <T extends AlgorithmParameterSpec> T engineGetParameterSpec(final Class<T> type) throws InvalidParameterSpecException { checkInit(); if (type.isAssignableFrom(getParameterType()) && type.isInstance(parameterSpec)) { return type.cast(parameterSpec); } else { throw log.invalidParameterSpec(getParameterType(), type); } }
/** * Implementation of the {@code engineGetEncoded} method. * * @return the encoded representation (not {@code null}) */ protected final byte[] engineGetEncoded() { checkInit(); return encoded; }
/** * Implementation of the {@code engineGetEncoded} method. * * @return the encoded representation (not {@code null}) */ protected final byte[] engineGetEncoded() { checkInit(); return encoded; }
/** * Implementation of the {@code engineGetEncoded} method. * * @return the encoded representation (not {@code null}) */ protected final byte[] engineGetEncoded() { checkInit(); return encoded; }
/** * Implementation of the {@code engineGetEncoded} method. * * @param format the format string (must not be {@code null}) * @return the encoded representation (not {@code null}) * @throws IOException if the given format is not {@code ASN.1} */ protected final byte[] engineGetEncoded(final String format) throws IOException { checkInit(); if ("ASN.1".equalsIgnoreCase(format)) { return engineGetEncoded(); } else { throw log.invalidFormat("ASN.1", format); } }
/** * Implementation of the {@code engineGetEncoded} method. * * @param format the format string (must not be {@code null}) * @return the encoded representation (not {@code null}) * @throws IOException if the given format is not {@code ASN.1} */ protected final byte[] engineGetEncoded(final String format) throws IOException { checkInit(); if ("ASN.1".equalsIgnoreCase(format)) { return engineGetEncoded(); } else { throw log.invalidFormat("ASN.1", format); } }
/** * Implementation of the {@code engineGetEncoded} method. * * @param format the format string (must not be {@code null}) * @return the encoded representation (not {@code null}) * @throws IOException if the given format is not {@code ASN.1} */ protected final byte[] engineGetEncoded(final String format) throws IOException { checkInit(); if ("ASN.1".equalsIgnoreCase(format)) { return engineGetEncoded(); } else { throw log.invalidFormat("ASN.1", format); } }
/** * Implementation of the {@code engineGetParameterSpec} method. * * @param type the parameter specification type class (must not be {@code null}) * @param <T> the parameter specification type * @return the parameter specification (must not be {@code null}) * @throws InvalidParameterSpecException if the type is not supported */ protected final <T extends AlgorithmParameterSpec> T engineGetParameterSpec(final Class<T> type) throws InvalidParameterSpecException { checkInit(); if (type.isAssignableFrom(getParameterType()) && type.isInstance(parameterSpec)) { return type.cast(parameterSpec); } else { throw log.invalidParameterSpec(getParameterType(), type); } }
/** * Implementation of the {@code engineGetParameterSpec} method. * * @param type the parameter specification type class (must not be {@code null}) * @param <T> the parameter specification type * @return the parameter specification (must not be {@code null}) * @throws InvalidParameterSpecException if the type is not supported */ protected final <T extends AlgorithmParameterSpec> T engineGetParameterSpec(final Class<T> type) throws InvalidParameterSpecException { checkInit(); if (type.isAssignableFrom(getParameterType()) && type.isInstance(parameterSpec)) { return type.cast(parameterSpec); } else { throw log.invalidParameterSpec(getParameterType(), type); } }
/** * Implementation of the {@code engineGetParameterSpec} method. * * @param type the parameter specification type class (must not be {@code null}) * @param <T> the parameter specification type * @return the parameter specification (must not be {@code null}) * @throws InvalidParameterSpecException if the type is not supported */ protected final <T extends AlgorithmParameterSpec> T engineGetParameterSpec(final Class<T> type) throws InvalidParameterSpecException { checkInit(); if (type.isAssignableFrom(getParameterType()) && type.isInstance(parameterSpec)) { return type.cast(parameterSpec); } else { throw log.invalidParameterSpec(getParameterType(), type); } }