Code example for NoSuchAlgorithmException

0
            ivLength = baseEngine.getBlockSize();
            cipher = new AEADGenericBlockCipher(new GCMBlockCipher(baseEngine));
        } 
        else 
        { 
            throw new NoSuchAlgorithmException("can't support mode " + mode);
        } 
    } 
 
    protected void engineSetPadding( 
        String  padding) 
    throws NoSuchPaddingException 
    { 
        String  paddingName = Strings.toUpperCase(padding);
 
        if (paddingName.equals("NOPADDING"))
        { 
            if (cipher.wrapOnNoPadding())
            { 
                cipher = new BufferedGenericBlockCipher(new BufferedBlockCipher(cipher.getUnderlyingCipher()));
            }