Class SalmonDriveKey

java.lang.Object
com.mku.salmon.SalmonDriveKey

public class SalmonDriveKey extends Object
Encryption keys and properties.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear the properties from memory.
    protected void
    Finalize.
    byte[]
    Function returns the encryption key that will be used to encrypt/decrypt the files
    byte[]
    Function returns the hash key that will be used to sign the file chunks
    int
    Get the number of iterations for the master key derivation.
    byte[]
    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.

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SalmonDriveKey

      public SalmonDriveKey()
  • Method Details

    • clear

      public void clear()
      Clear the properties from memory.
    • finalize

      protected void finalize() throws Throwable
      Finalize.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - Thrown if error occurs during finalization
    • 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