<commit_before>var ecc        = require("./ecc.node.js")
  , spkiECCPad = new Buffer("3056301006042b81047006082a8648ce3d030107034200","hex");

function getCurveKey(namedCurve){
  return ("sec" + namedCurve.replace(/-/g, '').toLowerCase() + "r1");
}

function spki_import(publicBytes, alg){
  var publicBytes = publicBytes.slice(spkiECCPad.length);

  return raw_import(publicBytes, alg);
}

function spki_export(Key){
  return Buffer.concat([spkiECCPad, raw_export(Key)]);
}

function raw_export(Key){
  console.log("raw ecc export")
  return new Buffer(Key.PublicKey);
}

function raw_import(publicBytes, alg){
  var curvekey = getCurveKey(alg.namedCurve)
    , curve    = ecc.ECCurves[curvekey];
<commit_msg>Fixing spki header.<commit_after>var ecc        = require("./ecc.node.js")
  , spkiECCPad = new Buffer("3059301306072a8648ce3d020106082a8648ce3d030107034200","hex");

function getCurveKey(namedCurve){
  return ("sec" + namedCurve.replace(/-/g, '').toLowerCase() + "r1");
}

function spki_import(publicBytes, alg){
  var publicBytes = publicBytes.slice(spkiECCPad.length);

  return raw_import(publicBytes, alg);
}

function spki_export(Key){
  return Buffer.concat([spkiECCPad, raw_export(Key)]);
}

function raw_export(Key){
  return new Buffer(Key.PublicKey);
}

function raw_import(publicBytes, alg){
  var curvekey = getCurveKey(alg.namedCurve)
    , curve    = ecc.ECCurves[curvekey];

{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.062142857142857146, 'mean_word_length': 5.546728971962617, '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': '502671', 'n_tokens_mistral': 550, 'n_tokens_neox': 510, 'n_words': 85}