Enum KeyDerivationHash
Specifies the underlying hash algorithm used by the PBKDF2 key derivation function when deriving symmetric keys from passwords. Controls both the internal hash state size and the throughput of the iterative hashing process.
Namespace: Scylla.Core.Util.Crypto
Assembly: ScyllaCore.dll
Syntax
public enum KeyDerivationHash
Remarks
The choice of hash algorithm does not materially affect the security of the derived key when an adequate iteration count (at least MIN_ITERATIONS) is used. The primary practical difference is performance on the target hardware.
Fields
| Name | Description |
|---|---|
| SHA256 | SHA-256 hash algorithm with a 256-bit (32-byte) internal state and output. The default and recommended choice for most platforms. Optimised natively on hardware with SHA extensions (common on x86-64 and ARM64 since 2015) and well-supported on all Unity build targets including WebGL. |
| SHA512 | SHA-512 hash algorithm with a 512-bit (64-byte) internal state and output. Provides a wider security margin than SHA256 and, on 64-bit platforms without hardware SHA extensions, often achieves higher throughput because its round operations map naturally to 64-bit word arithmetic. |