Java Security Architecture and Extensions
by Volker Roth

Listing One
AlgorithmIdentifier ::= SEQUENCE {
  algorithm OBJECT IDENTIFIER,
  parameters ANY DEFINED BY algorithm OPTIONAL
}


Listing Two
SignerInfo ::= SEQUENCE {
  version Version,
  issuerAndSerialNumber IssuerAndSerialNumber,
  digestAlgorithm DigestAlgorithmIdentifier,
  authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
  digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
  encryptedDigest EncryptedDigest,
  unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL,
}


Listing Three
public class MyAlgorithmParametersSpi extends AlgorithmParametersSpi
 {
   private MyAlgorithmParameterSpec mySpec;
   public AlgorithmParameterSpec engineGetParameterSpec(Class paramSpec)
     throws InvalidParameterSpecException
     {
      if (paramSpec.isAssignableFrom(MyAlgorithmParameterSpec.class))
          return mySpec;
      throw new InvalidParameterSpecException("Unsupported parameter spec!");
     }
}


