Class ChaCha20SpecUtil

java.lang.Object
org.bouncycastle.jcajce.provider.symmetric.util.ChaCha20SpecUtil

public class ChaCha20SpecUtil extends Object
Converts the JDK's 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.