Code example for GeneralSecurityException

Methods: getMessage

0
 
            return helper.createCipher(algorithm.getId());
        } 
        catch (GeneralSecurityException e)
        { 
            throw new OperatorCreationException("cannot create cipher: " + e.getMessage(), e);
        } 
    } 
 
    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