SHA

Definition

SHA (Secure Hash Algorithm) is a family of cryptographic hash functions designed to ensure data integrity. It produces a fixed-size hash value from input data of any size, making it useful for verifying data integrity and authenticity. The most commonly used versions are SHA-1, SHA-256, and SHA-512, with SHA-256 and SHA-512 being preferred due to their stronger security properties. SHA is widely used in digital signatures, certificate generation, and password hashing.

Secure Settings Example

# Example of using SHA-256 in a configuration file for hashing passwords
password_hashing:
  algorithm: SHA-256
  iterations: 10000
  salt_length: 16

Insecure Settings Example

# Example of insecure configuration using SHA-1
password_hashing:
  algorithm: SHA-1
  iterations: 1000
  salt_length: 8