Code example for PolicyQualifierInfo

Methods: getPolicyQualifier

0
        byte[] encoding = getDerEncoding();
        // get policy qualifier encoding 
        byte[] pqEncoding = new byte[28];
        System.arraycopy(encoding, 12, pqEncoding, 0, pqEncoding.length);
        // pass valid array 
        PolicyQualifierInfo i = new PolicyQualifierInfo(encoding);
        // get encoding 
        byte[] pqEncodingRet = i.getPolicyQualifier();
        // check returned array 
        assertTrue(Arrays.equals(pqEncoding, pqEncodingRet));
    } 
 
    /** 
     * Test #2 for <code>getPolicyQualifier()</code> method 
     * Assertion: a copy is returned each time 
     *  
     * @throws IOException 
     */ 
    public final void testGetPolicyQualifier02() throws IOException { 
        // get valid encoding 
        byte[] encoding = getDerEncoding();