getSha256HashToString method
Calculates the SHA-256 hash of a given public key.
Implementation
String getSha256HashToString(String publicKey) {
final sha256 = SHA256Digest();
final bytes = utf8.encode(publicKey);
final digest = sha256.process(Uint8List.fromList(bytes));
final result = hex.encode(digest);
return result.replaceAll('-', '').toUpperCase();
}