bwLehrpool Masterserver
Manages authentication and sharing of virtual machines between participating institutions
|
Static Public Member Functions | |
static final String | Sha512_crypt (String keyStr, String saltStr, int roundsCount) |
static final boolean | verifyPassword (String plaintextPass, String sha512CryptText) |
static final boolean | verifyHashTextFormat (String sha512CryptText) |
static void | selfTest () |
Static Package Attributes | |
static final ThreadLocal < MessageDigest > | sha2 = newThreadLocalSha512() |
Static Private Member Functions | |
static ThreadLocal< MessageDigest > | newThreadLocalSha512 () |
For instantiating TL sha512, so we don't have to copy this stuff twice. More... | |
static final String | b64_from_24bit (byte B2, byte B1, byte B0, int size) |
Static Private Attributes | |
static final String | sha512_salt_prefix = "$6$" |
static final String | sha512_rounds_prefix = "rounds=" |
static final int | SALT_LEN_MAX = 16 |
static final int | ROUNDS_DEFAULT = 5000 |
static final int | ROUNDS_MIN = 1000 |
static final int | ROUNDS_MAX = 999999999 |
static final String | SALTCHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" |
static final String | itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
static final ThreadLocal < MessageDigest > | sha1 = newThreadLocalSha512() |
Cache of sha512 digesters. More... | |
This class defines a method, Sha512_crypt(), which takes a password and a salt string and generates a Sha512 encrypted password entry.
This class implements the new generation, scalable, SHA512-based Unix 'crypt' algorithm developed by a group of engineers from Red Hat, Sun, IBM, and HP for common use in the Unix and Linux /etc/shadow files.
The Linux glibc library (starting at version 2.7) includes support for validating passwords hashed using this algorithm.
The algorithm itself was released into the Public Domain by Ulrich Drepper <drepp>. A discussion of the rationale and development of this algorithm is at er@r edhat .com
http://people.redhat.com/drepper/sha-crypt.html
and the specification and a sample C language implementation is at
http://people.redhat.com/drepper/SHA-crypt.txt
Definition at line 81 of file Sha512Crypt.java.
|
staticprivate |
|
staticprivate |
For instantiating TL sha512, so we don't have to copy this stuff twice.
Definition at line 103 of file Sha512Crypt.java.
|
static |
Validate our implementation using test data from Ulrich Drepper's C implementation.
Definition at line 452 of file Sha512Crypt.java.
|
static |
This method actually generates an Sha512 crypted password hash from a plaintext password and a salt.
The resulting string will be in the form '$6$<rounds=n>$<salt>$<hashed mess>
keyStr | Plaintext password |
saltStr | An encoded salt/roundes which will be consulted to determine the salt and round count, if not null |
roundsCount | If this value is not 0, this many rounds will used to generate the hash text. |
Definition at line 137 of file Sha512Crypt.java.
|
static |
Returns true if sha512CryptText is a valid Sha512Crypt hashtext, false if not.
Definition at line 404 of file Sha512Crypt.java.
|
static |
This method tests a plaintext password against a SHA512 Unix Crypt'ed hash and returns true if the password matches the hash.
plaintextPass | The plaintext password text to test. |
sha512CryptText | The hash text we're testing against. We'll extract the salt and the round count from this String. |
Definition at line 387 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 90 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 86 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 88 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 87 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 85 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 89 of file Sha512Crypt.java.
|
staticprivate |
Cache of sha512 digesters.
Definition at line 96 of file Sha512Crypt.java.
|
staticpackage |
Definition at line 97 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 84 of file Sha512Crypt.java.
|
staticprivate |
Definition at line 83 of file Sha512Crypt.java.