Class SalmonDefaultPbkdfProvider

java.lang.Object
com.mku.salmon.password.SalmonDefaultPbkdfProvider
All Implemented Interfaces:
ISalmonPbkdfProvider

public class SalmonDefaultPbkdfProvider extends Object implements ISalmonPbkdfProvider
Provides pbkdf algorithm.
  • Constructor Details

    • SalmonDefaultPbkdfProvider

      public SalmonDefaultPbkdfProvider()
  • Method Details

    • getKey

      public byte[] getKey(String password, byte[] salt, int iterations, int outputBytes, PbkdfAlgo pbkdfAlgo)
      Get a key derived from a text password
      Specified by:
      getKey in interface ISalmonPbkdfProvider
      Parameters:
      password - The text password.
      salt - The salt needs to be at least 24 bytes.
      iterations - Iterations to use. Make sure you use a high number according to your hardware specs.
      outputBytes - The length of the output key.
      pbkdfAlgo - The PBKDF algorithm to use
      Returns:
      The key.
      Throws:
      SalmonSecurityException - Thrown if there is a security exception