Code example for AlgorithmParameters

Methods: getEncoded

0
            if (encOid.equals(CMSSignedGenerator.ENCRYPTION_RSA_PSS))
            { 
                AlgorithmParameters sigParams = sig.getParameters();
 
                return new AlgorithmIdentifier( 
                    new DERObjectIdentifier(encOid), ASN1Object.fromByteArray(sigParams.getEncoded()));
            } 
            else 
            { 
                return new AlgorithmIdentifier( 
                    new DERObjectIdentifier(encOid), new DERNull());
            } 
        } 
    } 
 
    protected Map getBaseParameters(DERObjectIdentifier contentType, AlgorithmIdentifier digAlgId, byte[] hash)
    { 
        Map param = new HashMap();
        param.put(CMSAttributeTableGenerator.CONTENT_TYPE, contentType);
        param.put(CMSAttributeTableGenerator.DIGEST_ALGORITHM_IDENTIFIER, digAlgId);