diff --git a/docs/classes/APIReference.html b/docs/classes/APIReference.html
index dc9773f26..ca4934002 100644
--- a/docs/classes/APIReference.html
+++ b/docs/classes/APIReference.html
@@ -17,7 +17,7 @@
diff --git a/docs/data.json b/docs/data.json
index 71229390d..95bde5229 100644
--- a/docs/data.json
+++ b/docs/data.json
@@ -2,7 +2,7 @@
"project": {
"name": "CASS Javascript Library",
"description": "CASS Javascript Library API: ",
- "version": "1.2.22",
+ "version": "1.2.23",
"url": "http://cassproject.org/",
"logo": "http://docs.cassproject.org/img/customLogo-blue.png"
},
@@ -2447,7 +2447,7 @@
"module": "com.eduworks.ec",
"namespace": "",
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1152,
+ "line": 1160,
"description": "Async version of EcAesCtr that uses browser extensions (window.crypto) to accomplish cryptography much faster.\nFalls back to EcAesCtrAsyncWorker, if window.crypto is not available."
},
"EcView": {
@@ -23038,7 +23038,7 @@
},
{
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1033,
+ "line": 1041,
"description": "Asynchronous form of {{#crossLink\n\"EcRsaOaep/sign:method\"}}EcRsaOaep.sign{{/crossLink}}",
"params": [
{
@@ -23070,7 +23070,7 @@
},
{
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1072,
+ "line": 1080,
"description": "Asynchronous form of {{#crossLink\n\"EcRsaOaep/signSha256:method\"}}EcRsaOaep.signSha256{{/crossLink}}",
"params": [
{
@@ -23102,7 +23102,7 @@
},
{
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1111,
+ "line": 1119,
"description": "Asynchronous form of {{#crossLink\n\"EcRsaOaep/verify:method\"}}EcRsaOaep.verify{{/crossLink}}",
"params": [
{
@@ -23139,7 +23139,7 @@
},
{
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1159,
+ "line": 1167,
"description": "Asynchronous form of {{#crossLink\n\"EcAesCtr/encrypt:method\"}}EcAesCtr.encrypt{{/crossLink}}",
"params": [
{
@@ -23176,7 +23176,7 @@
},
{
"file": "src/main/js/cass/ec.crypto.js",
- "line": 1197,
+ "line": 1205,
"description": "Asynchronous form of {{#crossLink\n\"EcAesCtr/decrypt:method\"}}EcAesCtr.decrypt{{/crossLink}}",
"params": [
{
diff --git a/docs/files/src_main_js_cass_cass.adapter.js.html b/docs/files/src_main_js_cass_cass.adapter.js.html
index 2d7361528..e10044faa 100644
--- a/docs/files/src_main_js_cass_cass.adapter.js.html
+++ b/docs/files/src_main_js_cass_cass.adapter.js.html
@@ -17,7 +17,7 @@
@@ -1783,13 +1783,13 @@
File: src/main/js/cass/ec.crypto.js
* @method encrypt
* @static
*/
- constructor.encrypt = function(pk, text, success, failure) {
+ constructor.encrypt = function(pk, plainText, success, failure) {
if (EcRemote.async == false) {
- success(EcRsaOaep.encrypt(pk, text));
+ success(EcRsaOaep.encrypt(pk, plainText));
return;
}
if (EcBrowserDetection.isIeOrEdge() || window == null || window.crypto == null || window.crypto.subtle == null) {
- EcRsaOaepAsyncWorker.encrypt(pk, text, success, failure);
+ EcRsaOaepAsyncWorker.encrypt(pk, plainText, success, failure);
return;
}
var keyUsages = new Array();
@@ -1800,12 +1800,12 @@
File: src/main/js/cass/ec.crypto.js
if (pk.key == null)
window.crypto.subtle.importKey("jwk", pk.toJwk(), algorithm, false, keyUsages).then(function(key) {
pk.key = key;
- window.crypto.subtle.encrypt(algorithm, key, str2ab(forge.util.encodeUtf8(text))).then(function(p1) {
+ window.crypto.subtle.encrypt(algorithm, key, str2ab(forge.util.encodeUtf8(plainText))).then(function(p1) {
success(base64.encode(p1));
}, failure);
}, failure);
else
- window.crypto.subtle.encrypt(algorithm, pk.key, str2ab(forge.util.encodeUtf8(text))).then(function(p1) {
+ window.crypto.subtle.encrypt(algorithm, pk.key, str2ab(forge.util.encodeUtf8(plainText))).then(function(p1) {
success(base64.encode(p1));
}, failure);
};
@@ -1822,21 +1822,21 @@
File: src/main/js/cass/ec.crypto.js
* @method decrypt
* @static
*/
- constructor.decrypt = function(ppk, text, success, failure) {
+ constructor.decrypt = function(ppk, cipherText, success, failure) {
if (EcCrypto.caching) {
var cacheGet = null;
- cacheGet = (EcCrypto.decryptionCache)[ppk.toPem() + text];
+ cacheGet = (EcCrypto.decryptionCache)[ppk.toPem() + cipherText];
if (cacheGet != null) {
success(cacheGet);
return;
}
}
if (EcRemote.async == false) {
- success(EcRsaOaep.decrypt(ppk, text));
+ success(EcRsaOaep.decrypt(ppk, cipherText));
return;
}
if (EcBrowserDetection.isIeOrEdge() || window == null || window.crypto == null || window.crypto.subtle == null) {
- EcRsaOaepAsyncWorker.decrypt(ppk, text, success, failure);
+ EcRsaOaepAsyncWorker.decrypt(ppk, cipherText, success, failure);
return;
}
var keyUsages = new Array();
@@ -1847,13 +1847,21 @@
File: src/main/js/cass/ec.crypto.js
if (ppk.key == null)
window.crypto.subtle.importKey("jwk", ppk.toJwk(), algorithm, false, keyUsages).then(function(key) {
ppk.key = key;
- window.crypto.subtle.decrypt(algorithm, key, base64.decode(text)).then(function(p1) {
- success(forge.util.decodeUtf8(ab2str(p1)));
+ window.crypto.subtle.decrypt(algorithm, key, base64.decode(cipherText)).then(function(p1) {
+ var result = forge.util.decodeUtf8(ab2str(p1));
+ if (EcCrypto.caching) {
+ (EcCrypto.decryptionCache)[ppk.toPem() + cipherText] = result;
+ }
+ success(result);
}, failure);
}, failure);
else
- window.crypto.subtle.decrypt(algorithm, ppk.key, base64.decode(text)).then(function(p1) {
- success(forge.util.decodeUtf8(ab2str(p1)));
+ window.crypto.subtle.decrypt(algorithm, ppk.key, base64.decode(cipherText)).then(function(p1) {
+ var result = forge.util.decodeUtf8(ab2str(p1));
+ if (EcCrypto.caching) {
+ (EcCrypto.decryptionCache)[ppk.toPem() + cipherText] = result;
+ }
+ success(result);
}, failure);
};
/**
diff --git a/docs/files/src_main_js_cass_ec.ui.framework.js.html b/docs/files/src_main_js_cass_ec.ui.framework.js.html
index 6eaabe39f..639e8b787 100644
--- a/docs/files/src_main_js_cass_ec.ui.framework.js.html
+++ b/docs/files/src_main_js_cass_ec.ui.framework.js.html
@@ -17,7 +17,7 @@