Code example for Key

Methods: getAlgorithmgetEncoded

0
    	//log.info("getKeyFromKey:DummyKey"); 
    	return(new DummyKeySpec()); 
    } 
    public SecretKeySpec getKeyFromKey(Key k){
    	//log.info("getKeyFromKey:Key"); 
    	SecretKeySpec sks = new SecretKeySpec(k.getEncoded(), k.getAlgorithm());
    	return(sks);
    } 
     
 
    /** 
     * Returns decryption parameters (the Initialization Vector iv and the length of the stream) 
     * @param dis 
     * @return 
     * @throws IOException 
     */ 
    private DecryptionParameters getParametersFromStream(DataInputStream dis)throws IOException{
        DecryptionParameters val = new DecryptionParameters();
         
        //log.info("getParametersFromStream:dis="  + dis); 
        //log.info(" avail = " + dis.available());