Code example for Key

Methods: getEncoded

0
                throw new InvalidAlgorithmParameterException("PBE requires PBE parameters to be set.");
            } 
        } 
        else if (params instanceof IvParameterSpec)
        { 
            param = new ParametersWithIV(new KeyParameter(key.getEncoded()), ((IvParameterSpec)params).getIV());
        } 
        else if (params == null)
        { 
            param = new KeyParameter(key.getEncoded());
        } 
        else 
        { 
            throw new InvalidAlgorithmParameterException("unknown parameter type.");
        } 
 
        macEngine.init(param);
    } 
 
    protected int engineGetMacLength()  
    {