Organizing scripts: floCrypto v2.2.0
This commit is contained in:
parent
8094660f53
commit
3cb6c3f60c
@ -6636,9 +6636,11 @@
|
||||
})(typeof global !== 'undefined' ? global : window);
|
||||
</script>
|
||||
|
||||
<script id="floCrypto" version="2.0.1">
|
||||
/* FLO Crypto Operators*/
|
||||
const floCrypto = {
|
||||
<script id="floCrypto" version="2.2.0">
|
||||
'use strict';
|
||||
|
||||
(function(GLOBAL) {
|
||||
const floCrypto = GLOBAL.floCrypto = {
|
||||
|
||||
util: {
|
||||
p: BigInteger("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16),
|
||||
@ -6681,8 +6683,8 @@
|
||||
},
|
||||
|
||||
getSenderPublicKeyString: function() {
|
||||
privateKey = ellipticCurveEncryption.senderRandom();
|
||||
senderPublicKeyString = ellipticCurveEncryption.senderPublicString(privateKey);
|
||||
let privateKey = ellipticCurveEncryption.senderRandom();
|
||||
var senderPublicKeyString = ellipticCurveEncryption.senderPublicString(privateKey);
|
||||
return {
|
||||
privateKey: privateKey,
|
||||
senderPublicKeyString: senderPublicKeyString
|
||||
@ -6717,8 +6719,8 @@
|
||||
//If the private key corresponded to a compressed public key, also drop the last byte (it should be 0x01).
|
||||
if (isPubKeyCompressed == true) pk.pop()
|
||||
pk.unshift(0)
|
||||
privateKeyDecimal = BigInteger(pk).toString()
|
||||
privateKeyHex = Crypto.util.bytesToHex(pk)
|
||||
let privateKeyDecimal = BigInteger(pk).toString()
|
||||
let privateKeyHex = Crypto.util.bytesToHex(pk)
|
||||
return {
|
||||
privateKeyDecimal: privateKeyDecimal,
|
||||
privateKeyHex: privateKeyHex
|
||||
@ -6784,7 +6786,7 @@
|
||||
key.setCompressed(true);
|
||||
|
||||
var privateKeyArr = key.getBitcoinPrivateKeyByteArray();
|
||||
privateKey = BigInteger.fromByteArrayUnsigned(privateKeyArr);
|
||||
var privateKey = BigInteger.fromByteArrayUnsigned(privateKeyArr);
|
||||
var messageHash = Crypto.SHA256(data);
|
||||
|
||||
var messageHashBigInteger = new BigInteger(messageHash);
|
||||
@ -6972,6 +6974,8 @@
|
||||
m => String.fromCharCode(parseInt(m.replace(/\\u/g, ''), 16)));
|
||||
}
|
||||
}
|
||||
|
||||
})(typeof global !== "undefined" ? global : window);
|
||||
</script>
|
||||
<script id="floBlockchainAPI" version="2.1.1a">
|
||||
/* FLO Blockchain Operator to send/receive data from blockchain using API calls*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user