Sha3-224 Hash Generator Online
Generate Sha3-224 code
What is SHA3-224?
SHA3-224 is a cryptographic hash algorithm from the SHA-3 family. It is a fixed-length algorithm that produces 224-bit hash values, and is considered more secure than the SHA-2 family. The SHA-3 family was developed in response to the increased demand for more secure cryptographic algorithms, as well as a response to the security issues found in the SHA-2 family.
What is SHA3-224 usually used for?
SHA3-224 is typically used for digital signature generation, message authentication codes, and other cryptographic applications that require a high level of security. It is also used to generate unique identifiers (such as customer IDs) or to generate unique random numbers.
What programming languages support SHA3-224?
SHA3-224 is supported by various programming languages, such as Node.js, PHP, Java, C#, Python, Go Lang, and Dart.
Example code in Node.js
const crypto = require('crypto');
const data = 'myString';
const hash = crypto.createHash('sha3-224').update(data).digest('hex');
Example code in PHP
<?php
$data = 'myString';
$hash = hash('sha3-224', $data);
?>
Example code in Java
import java.security.MessageDigest;
public class SHA3_224 {
public static String getHash(String input) throws Exception {
MessageDigest md = MessageDigest.getInstance("SHA3-224");
byte[] messageDigest = md.digest(input.getBytes());
BigInteger no = new BigInteger(1, messageDigest);
String hashtext = no.toString(16);
while (hashtext.length() < 32) {
hashtext = "0" + hashtext;
}
return hashtext;
}
public static void main(String args[]) throws Exception {
System.out.println("Hash: "+ getHash("myString"));
}
}
Example code in C#
using System.Security.Cryptography;
public static string ComputeHash(string input)
{
SHA3_224 sha3_224 = SHA3_224.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = sha3_224.ComputeHash(inputBytes);
return System.BitConverter.ToString(hash).Replace("-", "");
}
Example code in Python
import hashlib
def get_sha3_224_hash(string):
sha3_224 = hashlib.sha3_224(string.encode('utf-8')).hexdigest()
return sha3_224
Example code in Go Lang
package main
import (
"fmt"
"crypto/sha3"
)
func main() {
data := []byte("myString")
hash := sha3.Sum224(data)
fmt.Printf("%x", hash)
}
Example code in Dart
import 'dart:convert';
String sha3_224(String data) {
var digest = sha3.Sha3_224().convert(utf8.encode(data));
return digest.toString();
}