Class Sha2Crypt

java.lang.Object
org.apache.commons.codec.digest.Sha2Crypt

public class Sha2Crypt extends Object
SHA2-based Unix crypt implementation.

Based on the C implementation released into the Public Domain by Ulrich Drepper <drepper@redhat.com> http://www.akkadia.org/drepper/SHA-crypt.txt

Conversion to Kotlin and from there to Java in 2012 by Christian Hammers <ch@lathspell.de> and likewise put into the Public Domain.

This class is immutable and thread-safe.

SHA-crypt hashing has a quadratic input-length step. To bound CPU and memory consumption when plaintext is supplied by an untrusted caller, plaintext is limited to 4096 bytes by default. The limit can be changed with the org.apache.commons.codec.digest.Sha2Crypt.keyMax system property; this property is intended for trusted JVM configuration only.

Since:
1.7