Closed
Description
Now that we have crypto libs appearing (thanks!) I want to ask for toHexString to be added to the crypto library. This is functionality that almost everyone has to write when using hashes like SHA1 or SHA256.
In fact, this function is copied twice in the tests for crypto:
Here's the function:
String digestToString(List<int> digest) {
var buf = new StringBuffer();
for (var part in digest) {
buf.add("${(part < 16) ? "0" : ""}${part.toRadixString(16).toLowerCase()}");
}
return buf.toString();
}
Please add this directly to the crypto library. Developers will thank you! :)