Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using digest to create a hash

Hi everyone, I was looking for a little help to hash a string using the device SDK. I found this snippet of code here:

 

https://dev.fitbit.com/blog/2018-10-05-announcing-fitbit-os-2.2/#cryptographic-digest

 

But I was wondering if someone could help me wrap this up into a function that takes a string to digest and returns a 64 character hexadecimal string representing the 256 bit hash?

 

I got it working fine in C# using this example found here:

 

https://www.c-sharpcorner.com/article/compute-sha256-hash-in-c-sharp/

 

I'm just looking for an exact equivalent that'll run on the device.

 

Any help much appreciated!

Best Answer
0 Votes
1 REPLY 1

Don't worry I think I worked it out.

Best Answer
0 Votes