sha512 constant
Hash
const sha512
SHA-512 as specified in FIPS PUB 180-4.
Example
import 'dart:convert' show base64, utf8;
import 'package:webcrypto/webcrypto.dart';
// Convert 'hello world' to a byte array
final bytesToHash = utf8.encode('hello world');
// Compute hash of bytesToHash with sha-512
List<int> hash = await Hash.sha512.digestBytes(bytesToHash);
// Print the base64 encoded hash
print(base64.encode(hash));
Implementation
static const Hash sha512 = impl.sha512;