<commit_before>var sodium = require('sodium-prebuilt').api

exports.keyPair = function (seed) {
  if (seed) {
    if (seed.length !== sodium.crypto_sign_SEEDBYTES) {
      throw new Error('Seed must be ' + sodium.crypto_sign_SEEDBYTES + ' bytes long')
    }

    return sodium.crypto_sign_seed_keypair(seed)
  }<commit_msg>seed bytes fallback to 32 until paixaop/node-sodium#86 has been merged<commit_after>var sodium = require('sodium-prebuilt').api

var SEED_BYTES = sodium.crypto_sign_SEEDBYTES || 32

exports.keyPair = function (seed) {
  if (seed) {
    if (seed.length !== SEED_BYTES) throw new Error('Seed must be ' + SEED_BYTES + ' bytes long')
    return sodium.crypto_sign_seed_keypair(seed)
  }
{'fraction_non_alphanumeric': 0.11773049645390071, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 4.3893129770992365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7072001', 'n_tokens_mistral': 259, 'n_tokens_neox': 240, 'n_words': 55}