Package com.mku.salmonfs.drive
Class DriveKey
- java.lang.Object
-
- com.mku.salmonfs.drive.DriveKey
-
public class DriveKey extends java.lang.Object
Encryption keys and properties.
-
-
Constructor Summary
Constructors Constructor Description DriveKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the properties from memory.byte[]
getDriveKey()
Function returns the encryption key that will be used to encrypt/decrypt the filesbyte[]
getHashKey()
Function returns the hash key that will be used to sign the file chunksint
getIterations()
Get the number of iterations for the master key derivation.byte[]
getMasterKey()
Get the master key.void
setDriveKey(byte[] driveKey)
Set the drive key.void
setHashKey(byte[] hashKey)
Set the hash key.void
setIterations(int iterations)
Set the number of iterations for the master key derivation.void
setMasterKey(byte[] masterKey)
Set the master key.
-
-
-
Method Detail
-
clear
public void clear()
Clear the properties from memory.
-
getDriveKey
public byte[] getDriveKey()
Function returns the encryption key that will be used to encrypt/decrypt the files- Returns:
- The encryption key
-
getHashKey
public byte[] getHashKey()
Function returns the hash key that will be used to sign the file chunks- Returns:
- The hash key
-
setDriveKey
public void setDriveKey(byte[] driveKey)
Set the drive key.- Parameters:
driveKey
- The drive key
-
setHashKey
public void setHashKey(byte[] hashKey)
Set the hash key.- Parameters:
hashKey
- The hash key
-
getMasterKey
public byte[] getMasterKey()
Get the master key.- Returns:
- The master key
-
setMasterKey
public void setMasterKey(byte[] masterKey)
Set the master key.- Parameters:
masterKey
- The master key
-
getIterations
public int getIterations()
Get the number of iterations for the master key derivation.- Returns:
- The iterations
-
setIterations
public void setIterations(int iterations)
Set the number of iterations for the master key derivation.- Parameters:
iterations
- The iterations
-
-