case class SecureHash(iterations: Int = 120000, dkLength: Int = 32, cryptoAlgo: String = "HmacSHA512") extends Product with Serializable
This is the legacy API.
- iterations
the number of encryption iterations. Default to 120000
- dkLength
derived-key length, default to 32
- cryptoAlgo
HMAC+SHA512 is the default as HMAC+SHA1 is now considered weak
- Alphabetic
- By Inheritance
- SecureHash
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SecureHash(iterations: Int = 120000, dkLength: Int = 32, cryptoAlgo: String = "HmacSHA512")
- iterations
the number of encryption iterations. Default to 120000
- dkLength
derived-key length, default to 32
- cryptoAlgo
HMAC+SHA512 is the default as HMAC+SHA1 is now considered weak
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val cryptoAlgo: String
- val dkLength: Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val iterations: Int
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def validatePassword(password: String, hashedPassword: String): Boolean
Validate a password against a password hash
Validate a password against a password hash
this function will first try to validate with the *new* format as generated by io.github.nremond.SecureHash.createHash. if it fails, it will fall back to the *old* format, making this function very useful when transitioning form the *old* to the *new* format.
- password
the password to validate
- hashedPassword
the password hash.
- returns
true is the password is valid
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def createHash(password: String): String
Creates a hashed password using PBKDF2
Creates a hashed password using PBKDF2
this function output a string in the following format:
salt:key
- salt : hex encoded salt
- key : hex encoded derived key
Example :
a9c654289407047fd197516196e14b97bdabfa4bc934d0e9:f2f458b2502ca7595a4c964b14f146bd9c49174fa41b625227602bf4aaffbf5e
- password
the password to hash
- Annotations
- @deprecated
- Deprecated
(Since version pbkdf2-scala 0.5) Only create password via io.github.nremond.SecureHash
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated