work static method

Future<String?> work(
  1. Object data,
  2. Object salt, {
  3. Algorithm? algorithm,
  4. Encoding? encoding,
})

Gives a Proof of Work by hasshing the data provided.

Implementation

static Future<String?> work(
  Object data,
  Object salt, {
  Algorithm? algorithm,
  Encoding? encoding,
}) {
  final opt = dartToJs({
    'name': algorithm?.value,
    'encode': encoding?.value,
  });
  return toFuture(SeaJsImpl.work(dartToJs(data), salt, null, opt));
}