com.zipxap.vfs
Class CipherSettings

java.lang.Object
  extended by com.zipxap.vfs.CipherSettings

public class CipherSettings
extends java.lang.Object

This class contains cipher settings that are used by this library to implement password based encryption.

MilestoneWhoDate, Time
Initial VersionK PenroseJune 2009

** Note that this table is not intended as an exhaustive list of subtle changes. It is intended to list changes that break the compatibility of older code, or major enhancements/rewrites


Constructor Summary
CipherSettings()
          This constructor is usually for test purposes only.
CipherSettings(java.lang.String password, byte[] salt, int nIterations, java.lang.String confirmationText)
          This is the preferred constructor.
 
Method Summary
 java.lang.String getConfirmationText()
          The confirmation text can be used by an application, after decrypting, to confirm that the cipher settings are correct.
 int getNIterations()
           
 java.lang.String getPassword()
           
 byte[] getSalt()
           
 void setPassword(java.lang.String password)
          Set the password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CipherSettings

public CipherSettings()
This constructor is usually for test purposes only.


CipherSettings

public CipherSettings(java.lang.String password,
                      byte[] salt,
                      int nIterations,
                      java.lang.String confirmationText)
This is the preferred constructor.

Parameters:
password -
salt - This should be a random sequence of 8 bytes.
nIterations - The number of times to apply the encryption/decryption.
confirmationText -
Method Detail

setPassword

public void setPassword(java.lang.String password)
Set the password


getPassword

public java.lang.String getPassword()
Returns:
the password

getSalt

public byte[] getSalt()
Returns:
the salt

getNIterations

public int getNIterations()
Returns:
the nIterations

getConfirmationText

public java.lang.String getConfirmationText()
The confirmation text can be used by an application, after decrypting, to confirm that the cipher settings are correct.

Returns:
the confirmationText