sha256

string

Generates a SHA-256 cryptographic hash of a string

Syntax

sha256(string)

Parameters

string (string)

The string to hash

Returns

string

SHA-256 hash as hexadecimal string

Examples

Input:
sha256("password")
Output:
"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"
Input:
sha256("hello")
Output:
"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
Input:
"test" | sha256
Output:
"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"

The sha256() function generates a SHA-256 cryptographic hash of a string. SHA-256 is part of the SHA-2 family and produces a 256-bit (64 hexadecimal character) hash.

Usage

Use sha256() for secure password hashing, data integrity verification, creating checksums, or generating unique identifiers.

Related Functions