-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f3ff66
commit c95b935
Showing
6 changed files
with
95 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
(function() { | ||
(function () { | ||
module.exports = require('./lib/RNCryptor'); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
(function() { | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
(function () { | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
var spec_dir = path.join(__dirname, '../spec/vectors/v3/'); | ||
const spec_dir = path.join(__dirname, '../spec/vectors/v3/'); | ||
|
||
fs.readdirSync(spec_dir).forEach(function(file) { | ||
var aux_object; | ||
fs.readdirSync(spec_dir).forEach(function (file) { | ||
let aux_object; | ||
exports[file] = []; | ||
|
||
var file_content = fs.readFileSync(spec_dir + file); | ||
file_content.toString().split('\n').forEach(function(line) { | ||
if(line === '' || line[0] === '#') return; | ||
const file_content = fs.readFileSync(spec_dir + file); | ||
file_content.toString().split('\n').forEach(function (line) { | ||
if (line === '' || line[0] === '#') return; | ||
|
||
var key_value = line.split(':'); | ||
if(key_value[0] === 'title') aux_object = {}; | ||
const key_value = line.split(':'); | ||
if (key_value[0] === 'title') aux_object = {}; | ||
|
||
if(['key_hex', 'ciphertext_hex', 'plaintext_hex'].indexOf(key_value[0]) >= 0) | ||
if (['key_hex', 'ciphertext_hex', 'plaintext_hex'].indexOf(key_value[0]) >= 0) | ||
key_value[1] = key_value[1].replace(/\s+/g, ''); | ||
|
||
aux_object[key_value[0]] = key_value[1].trim() || ''; | ||
|
||
if(['key_hex', 'ciphertext_hex'].indexOf(key_value[0]) >= 0) exports[file].push(aux_object); | ||
if (['key_hex', 'ciphertext_hex'].indexOf(key_value[0]) >= 0) exports[file].push(aux_object); | ||
}); | ||
}); | ||
})(); |
Oops, something went wrong.