defaultHashFunctionChoice top-level constant

HashFunctionChoice const defaultHashFunctionChoice

Default hash function choice for SRP operations.

SHA-256 provides a balance between compatibility, speed and security:

  • No performance penalty on 32-bit systems (unlike SHA-512).
  • Avoids SHA-1 vulnerabilities to pre-image attacks.
  • Widely supported and well-tested.

You can override this by specifying a different HashFunctionChoice when creating User or Server instances.

Implementation

const defaultHashFunctionChoice = HashFunctionChoice.sha256;