public class ChaCha20SpecUtil
extends java.lang.Object
javax.crypto.spec.ChaCha20ParameterSpec (Java 11 and later) into the BC equivalent,
BCChaCha20ParameterSpec, so the provider only has to handle the BC type.
This copy works by reflection, so it compiles for any Java version and finds the JDK class wherever the runtime has it - including from the legacy distributions, which carry no multi-release overlays. The jdk1.11 copy uses the class directly. The two copies must keep the same public members: a caller compiled against this one is paired at runtime with whichever copy the JVM loads.
| Constructor and Description |
|---|
ChaCha20SpecUtil() |
| Modifier and Type | Method and Description |
|---|---|
static BCChaCha20ParameterSpec |
toBCChaCha20Spec(java.security.spec.AlgorithmParameterSpec paramSpec)
Convert a
javax.crypto.spec.ChaCha20ParameterSpec into the BC equivalent. |
public static BCChaCha20ParameterSpec toBCChaCha20Spec(java.security.spec.AlgorithmParameterSpec paramSpec) throws java.security.InvalidAlgorithmParameterException
javax.crypto.spec.ChaCha20ParameterSpec into the BC equivalent.paramSpec - the parameter spec to convert, may be null.BCChaCha20ParameterSpec, or null if paramSpec is not a
javax.crypto.spec.ChaCha20ParameterSpec.java.security.InvalidAlgorithmParameterException - if paramSpec is one, but its values cannot be read.