hashToNum method

DummyCastle hashToNum()

Hashes(reduces) a text internally into a long number represented as a string. The result may be obtained using getResult() method.

return this object for chaining.

Implementation

DummyCastle hashToNum() {
  if ((resultBytes == null || resultBytes.length == 0)) {
    exception = new Exception("Empty or null argument");
    error = true;
    return this;
  }
  try {
    resultBytes =
        Coder.getBytesSimple(HashClient.defaultHash(resultBytes).toString());
  } on Exception catch (e) {
    setUpError(e);
  }
  return this;
}