Updated std ops

This commit is contained in:
sairaj mote 2022-01-05 15:32:37 +05:30
parent 959cf812ed
commit 5d830b1168

View File

@ -5405,9 +5405,9 @@
/**
* Electronic Code Book mode.
*
*
* ECB applies the cipher directly against each block of the input.
*
*
* ECB does not require an initialization vector.
*/
var ECB = C_mode.ECB = function () {
@ -5442,7 +5442,7 @@
/**
* Cipher block chaining
*
*
* The first block is XORed with the IV. Subsequent blocks are XOR with the
* previous cipher output.
*/
@ -5496,11 +5496,11 @@
/**
* Cipher feed back
*
*
* The cipher output is XORed with the plain text to produce the cipher output,
* which is then fed back into the cipher to produce a bit pattern to XOR the
* next block with.
*
*
* This is a stream cipher mode and does not require padding.
*/
var CFB = C_mode.CFB = function () {
@ -5548,10 +5548,10 @@
/**
* Output feed back
*
*
* The cipher repeatedly encrypts its own output. The output is XORed with the
* plain text to produce the cipher text.
*
*
* This is a stream cipher mode and does not require padding.
*/
var OFB = C_mode.OFB = function () {
@ -5697,17 +5697,17 @@
/*
* Copyright (c) 2010-2011 Intalio Pte, All Rights Reserved
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -5727,7 +5727,7 @@
* N = Cpu cost
* r = Memory cost
* p = parallelization cost
*
*
*/
window.Crypto_scrypt = function (passwd, salt, N, r, p, dkLen, callback) {
if (N == 0 || (N & (N - 1)) != 0) throw Error("N must be > 0 and a power of 2");
@ -7648,11 +7648,11 @@
/*
Copyright (c) 2011 Stefan Thomas
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
@ -8589,7 +8589,7 @@
(function (ellipticCurveType) {
//Defining Elliptic Encryption Object
//Defining Elliptic Encryption Object
var ellipticEncryption = window.ellipticCurveEncryption = function () { };
ellipticEncryption.rng = new SecureRandom();
@ -8677,7 +8677,7 @@
}
//In real life ellipticEncryption.receiverPublicString is the public key of the receiver.
//you don't have to run receiverRandom and the bottom function
//you don't have to run receiverRandom and the bottom function
ellipticEncryption.receiverPublicString = function (receiverPublicKey) {
var receiverKeyECData = {};
@ -9310,7 +9310,7 @@
addedDiff(original, updatedObj) returns only the values added to the updated object
deletedDiff(original, updatedObj) returns only the values deleted in the updated object
updatedDiff(original, updatedObj) returns only the values that have been changed in the updated object
findDiff(original, updatedObj) returns an object with the added, deleted and updated differences
findDiff(original, updatedObj) returns an object with the added, deleted and updated differences
mergeRecursive(original, diff) returns a new object that will merge difference to old object
mergeDiff(original, allDiff) returns a new object from original object merged with all differences (allDiff is returned object of findDiff)
*/
@ -9487,7 +9487,7 @@
// Recurse...
cleanse(value);
// ...and remove if now "empty" (NOTE: insert your definition of "empty" here)
//if (!Object.keys(value).length)
//if (!Object.keys(value).length)
// delete obj[key];
}
else if (value === null)
@ -9760,7 +9760,7 @@
}
},
//Split the str using shamir's Secret and Returns the shares
//Split the str using shamir's Secret and Returns the shares
createShamirsSecretShares: function (str, total_shares, threshold_limit) {
try {
if (str.length > 0) {
@ -9927,7 +9927,7 @@
});
},
//Send Tx to blockchain
//Send Tx to blockchain
sendTx: function (senderAddr, receiverAddr, sendAmt, privKey, floData = '', strict_utxo = true) {
return new Promise((resolve, reject) => {
if (!floCrypto.validateASCII(floData))
@ -10562,7 +10562,7 @@
},
/*searchData: function (obsName, options = {}, dbName = this.defaultDB) {
return new Promise((resolve, reject) => {
this.openDB(dbName).then(db => {
var obs = db.transaction(obsName, "readonly").objectStore(obsName);
@ -11599,7 +11599,7 @@
resolve(secret)
else
reject("Shares are insufficient or incorrect")
}).catch(error => reject(error))
}).catch(error => { floDapps.clearCredentials(); location.reload(); })
})
}
@ -11946,7 +11946,7 @@
resolve(secret)
else
reject("Shares are insufficient or incorrect")
}).catch(error => reject(error))
}).catch(error => { floDapps.clearCredentials(); location.reload(); })
})
}
return new Promise((resolve, reject) => {