Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
PHP $hash = hash('sha256', $string); Example: correct table definition sql ALTER TABLE my_table ADD COLUMN sha256_hash VARCHAR(64) NOT NULL; Then populate it with: sql UPDATE my_table SET sha256_hash = CONVERT(VARCHAR(64), HASHBYTES('SHA2_256', plain_string_field), 2); This produces uppercase hex, which is fully compatible with PHP’s lowercase hex. ✔ Final recommendation Use VARCHAR(64) for storing SHA‑256 hashes generated by PHP.
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)