<commit_before>CryptoIdentity.generateCurrentIdentity().then(function(identity){
  QUnit.test( "identity should had data", function( assert ) {
    assert.ok( identity.private != null);
    assert.ok( identity.public != null);
  });

  QUnit.test( "should be able to get safe identity", function( assert ) {
    var safeIdentity = CryptoIdentity.getSafeIdentity(identity);
    assert.ok( safeIdentity.private === undefined);
    assert.ok( safeIdentity.public != null);
  });

  QUnit.test( "should be able to verify messages", function( assert ) {
    var message = "Hello World!"
    var signature = CryptoIdentity.createMessageSignature(identity,message)
    assert.ok(CryptoIdentity.verifyMessageSignature(identity,message,signature))
    assert.ok(CryptoIdentity.verifyMessageSignature(identity,message,"")==false)
  });

  QUnit.test( "should be able to encrypt and decrypt message", function( assert ) {
    var message = "Hello World!"
    var encryptedMessage = CryptoIdentity.encrypt(identity,message)
    assert.ok(CryptoIdentity.decrypt(identity,encryptedMessage)==message);
  });<commit_msg>updating tests<commit_after>CryptoIdentity.generateCurrentIdentity().then(function(identity){
  var safeIdentity = CryptoIdentity.getSafeIdentity(identity);
  QUnit.test( "identity should had data", function( assert ) {
    assert.ok( identity.private != null);
    assert.ok( identity.public != null);
  });

  QUnit.test( "should be able to get safe identity", function( assert ) {
    assert.ok( safeIdentity.private === undefined);
    assert.ok( safeIdentity.public != null);
  });

  QUnit.test( "should be able to verify messages", function( assert ) {
    var message = "Hello World!"
    var signature = CryptoIdentity.createMessageSignature(identity,message)
    assert.ok(CryptoIdentity.verifyMessageSignature(safeIdentity,message,signature))
    assert.ok(CryptoIdentity.verifyMessageSignature(safeIdentity,message,"")==false)
  });

  QUnit.test( "should be able to encrypt and decrypt message", function( assert ) {
    var message = "Hello World!"
    var encryptedMessage = CryptoIdentity.encrypt(safeIdentity,message)
    assert.ok(CryptoIdentity.decrypt(identity,encryptedMessage)==message);
  });
{'fraction_non_alphanumeric': 0.12347904461469131, 'fraction_numerical': 0.0, 'mean_word_length': 5.166666666666667, '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': '2571473', 'n_tokens_mistral': 612, 'n_tokens_neox': 601, 'n_words': 141}