Class DefaultPbkdfProvider

  • All Implemented Interfaces:
    IPbkdfProvider

    public class DefaultPbkdfProvider
    extends java.lang.Object
    implements IPbkdfProvider
    Provides pbkdf functions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getKey​(java.lang.String password, byte[] salt, int iterations, int outputBytes, PbkdfAlgo pbkdfAlgo)
      Get a key derived from a text password
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultPbkdfProvider

        public DefaultPbkdfProvider()
    • Method Detail

      • getKey

        public byte[] getKey​(java.lang.String password,
                             byte[] salt,
                             int iterations,
                             int outputBytes,
                             PbkdfAlgo pbkdfAlgo)
        Get a key derived from a text password
        Specified by:
        getKey in interface IPbkdfProvider
        Parameters:
        password - The text password.
        salt - The salt (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:
        SecurityException - Thrown if there is a security exception