Hash (Expression) — Skript
Addon: Skript · Category: Expression · Since: 2.0, 2.2-dev32 (SHA-256 algorithm), 2.12 (SHA-384, SHA-512)
Syntax
%strings% hash[ed] with (MD5|SHA-256|SHA-384|SHA-512)Description
Hashes the given text using the MD5 or SHA algorithms. Each algorithm is suitable for different use cases. These hashing algorithms are not suitable for hashing passwords. If handling passwords, use a <a href='https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#password-hashing-algorithms'>hashing algorithm specifically designed for passwords</a>. MD5 is deprecated and may be removed in a future release. It is provided mostly for backwards compatibility, as it is outdated and not secure. SHA is more secure, but is not suitable for hashing passwords (even with salting). When hashing data, you <strong>must</strong> specify algorithms that will be used for security reasons! Please note that a hash cannot be reversed under normal circumstances. You will not be able to get original value from a hash with Skript.
Examples
set {_hash} to "hello world" hashed with SHA-256