---
title: "Discussion on \"Calculate sha256 hash in dart\" | Hashnode"
description: "Discussion on \"Calculate sha256 hash in dart\". Use the crypto package we can calculate sha hash:\nInstall:\n$ dart pub add crypto\n\nExample:\nimport 'dart:convert';\nimport 'package:crypto/crypto.dart';\n\nString sha256hash(String s) {\n  var bytes = utf8.encode(s); // data being hashed\n  return sha256.c..."
url: "https://hashnode.com/posts/calculate-sha256-hash-in-dart/608f6667a3716542f36410ed"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Calculate sha256 hash in dart](https://hn.0xbf.me/calculate-sha256-hash-in-dart?utm_source=hashnode&utm_medium=feed)

Use the crypto package we can calculate sha hash: Install: $ dart pub add crypto Example: import 'dart:convert'; import 'package:crypto/crypto.dart'; String sha256hash(String s) { var bytes = utf8.encode(s); // data being hashed return sha256.c...

May 3, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#dart](https://hashnode.com/tag/dart)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
