Code example for GeneralSecurityException

Methods: getMessage

0
    Cipher createSymmetricWrapper(ASN1ObjectIdentifier algorithm)
        throws OperatorCreationException 
    { 
        try 
        { 
            String cipherName = (String)symmetricWrapperAlgNames.get(algorithm);
 
            if (cipherName != null)
            { 
                try 
                { 
                    // this is reversed as the Sun policy files now allow unlimited strength RSA 
                    return helper.createCipher(cipherName);
                } 
                catch (NoSuchAlgorithmException e)
                { 
                    // Ignore 
                } 
            } 
            return helper.createCipher(algorithm.getId());
        }