<commit_before>var bindings = require("bindings")("argon2_lib");

exports.encrypt = function (plain, salt, callback) {
  "use strict";

  if (salt.length < 16) {
    callback(new Error("Salt too long, maximum 16 characters."), null);
    return;
  }

  return bindings.encrypt(plain, salt, callback);
};

exports.verify = function (encrypted, plain, callback) {
  "use strict";

  return bindings.verify(encrypted, plain, callback);
}<commit_msg>Make long salt callback really async<commit_after>var bindings = require("bindings")("argon2_lib");

exports.encrypt = function (plain, salt, callback) {
  "use strict";

  if (salt.length > 16) {
    process.nextTick(function () {
      callback(new Error("Salt too long, maximum 16 characters."), null);
    });
    return;
  }

  return bindings.encrypt(plain, salt, callback);
};

exports.verify = function (encrypted, plain, callback) {
  "use strict";

  return bindings.verify(encrypted, plain, callback);
}
{'fraction_non_alphanumeric': 0.14375, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 4.491428571428571, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7495515', 'n_tokens_mistral': 313, 'n_tokens_neox': 287, 'n_words': 80}