Code example for AlgorithmParameters

Methods: getEncoded

0
    { 
        // we try ASN.1 explicitly first just in case and then role back to the default. 
        ASN1Encodable asn1Params;
        try 
        { 
            asn1Params = ASN1Primitive.fromByteArray(params.getEncoded("ASN.1"));
        } 
        catch (Exception ex)
        { 
            asn1Params = ASN1Primitive.fromByteArray(params.getEncoded());
        } 
 
        return asn1Params;
    } 
 
    /** 
     * Load an AlgorithmParameters object with the passed in ASN.1 encodable - if possible. 
     * 
     * @param params the AlgorithmParameters object to be initialised. 
     * @param sParams the ASN.1 encodable to initialise params with. 
Contextual code suggestions in your IDE  Get Codota for Java