code: function(data, keysize) {
        var input, mode;
        if (keysize == null) {
          keysize = 512;
        }
        data = this.toHex(data);
        mode = "SHA-" + keysize;
        input = new jsSHA(data, "HEX");
        return input.getHash(mode, "HEX");
      }
docs: Create a hash digest of data.
  @param {String|Buffer} data The data to hash.
  @param {Number} [keysize=512] The keysize for the hash function.
  @return {String} The hash digest encoded as hex.