java.lang.Object
org.firebirdsql.gds.ng.wire.auth.legacy.LegacyHash

public final class LegacyHash extends Object
Implements the one way password hash used by the legacy authentication of Firebird.

NOTE: This class was modified to only be applicable specifically to the hash used by Firebird, it is not generally usable.

Original class name: UnixCrypt

Author:
Greg Wilkins (gregw)
  • Method Details

    • fbCrypt

      public static byte[] fbCrypt(@Nullable String key, String charsetName)
      Encrypts key into UnixCrypt hash as used by Firebird Legacy_Auth.
      Parameters:
      key - the key to be encrypted
      charsetName - character set to convert key to bytes
      Returns:
      the encrypted String
      Since:
      6.0.6