Class PasswordHashCodec

java.lang.Object
com.svenruppert.jsentinel.credential.password.envelope.PasswordHashCodec

public final class PasswordHashCodec extends Object
Self-describing envelope codec for Phase-1a password-hash strings.

The wire format is a stable, human-readable string built from $-separated fields:

$pwh$v=1$ct=PASSWORD$alg=PBKDF2WithHmacSHA256$prov=pbkdf2-jdk
  $pol=1[$pep=<keyId>]$p=k=v(,k=v)*$h=<innerHash>

The codec performs no cryptographic work. It does not run key-derivation functions, validate algorithm strength or look up providers. It only parses, validates the envelope structure, and serialises a PasswordHashEnvelope back to a string.

Exception messages emitted from this codec are deliberately structural and must not embed user-supplied substrings, salts, inner hashes or pepper key identifiers.

  • Field Details

    • DEFAULT

      public static final PasswordHashCodec DEFAULT
      Shared default instance. The codec is stateless.
  • Constructor Details

    • PasswordHashCodec

      public PasswordHashCodec()
  • Method Details