Use cryptographic algorithms to hash data in Flutter

Photo by Alexander Sinn on Unsplash


In this tutorial, we’ll look to make our mobile apps more secure and safe. We can achieve this, for instance, by encrypting sensitive user data. I will show you exactly how this works with Flutter.

We will take a closer look at cryptographic hashing algorithms and see how the algorithms SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, MD5, HMAC (i.e. HMAC-MD5, HMAC-SHA1, HMAC-SHA256) can be used in Flutter to hash data.

To do this, we’ll create an app that receives a text and, if needed, a password and transforms it into hash values using the different algorithms named before.

Additionally, I will show you how to use a TextEditingController to change the hash value at runtime and copy the hash value itself with just one click.

Here’s a look at the app in action:

Continue reading …

This post is also available on DEV.