...
Code Block |
---|
"evaluable": true,
"responseDeclaration": {
"response1": {
"maxScore": 1,
"cardinality": "single",
"type": "integer",
-- To be Trimmed off ----
"correctResponse": {
"value": "0",
"outcomes": {
"SCORE": 1
}
},
-- To be Trimmed off --
#Newly Introduced Attribute
"responseKey": "#Computed Hash/Encrypted Value of the result"
}
}, |
...
Question Set Response Processing flow
...
Code Block | ||||
---|---|---|---|---|
| ||||
console.time("dbsave");
var crypto = require('crypto');
var hashList = [];
var string = "sdgxsoksgdaodjqwdhuwdh";
var count = 0;
var salt = "salty";
for(var i=0;i<1000000;i++) {
var hash = crypto.pbkdf2('secret'+i, salt, 10, 64, 'sha512', (err, derivedKey) => {
if (err) throw err;
});
hashList.push(hash);
if(string === hash) {
count++;
}
}
console.log(count);
console.log(hashList.length);
console.timeEnd("dbsave"); |
Response Times for Benchmarking
...