1 package org.bouncycastle.jcajce.provider.symmetric.util; 2 3 import java.security.AlgorithmParametersSpi; 4 import java.security.spec.AlgorithmParameterSpec; 5 import java.security.spec.InvalidParameterSpecException; 6 7 public abstract class BaseAlgorithmParameters 8 extends AlgorithmParametersSpi 9 { isASN1FormatString(String format)10 protected boolean isASN1FormatString(String format) 11 { 12 return format == null || format.equals("ASN.1"); 13 } 14 engineGetParameterSpec( Class paramSpec)15 protected AlgorithmParameterSpec engineGetParameterSpec( 16 Class paramSpec) 17 throws InvalidParameterSpecException 18 { 19 if (paramSpec == null) 20 { 21 throw new NullPointerException("argument to getParameterSpec must not be null"); 22 } 23 24 return localEngineGetParameterSpec(paramSpec); 25 } 26 localEngineGetParameterSpec(Class paramSpec)27 protected abstract AlgorithmParameterSpec localEngineGetParameterSpec(Class paramSpec) 28 throws InvalidParameterSpecException; 29 } 30