Cleanup style inconsistencies in cfb.js and random.js
This commit is contained in:
parent
1997e445f9
commit
9da63d56b3
|
@ -51,7 +51,7 @@ export default {
|
||||||
var FR = new Uint8Array(block_size);
|
var FR = new Uint8Array(block_size);
|
||||||
var FRE = new Uint8Array(block_size);
|
var FRE = new Uint8Array(block_size);
|
||||||
|
|
||||||
var new_prefix = new Uint8Array(prefixrandom.length+2);
|
var new_prefix = new Uint8Array(prefixrandom.length + 2);
|
||||||
new_prefix.set(prefixrandom);
|
new_prefix.set(prefixrandom);
|
||||||
new_prefix[prefixrandom.length] = prefixrandom[block_size-2];
|
new_prefix[prefixrandom.length] = prefixrandom[block_size-2];
|
||||||
new_prefix[prefixrandom.length+1] = prefixrandom[block_size-1];
|
new_prefix[prefixrandom.length+1] = prefixrandom[block_size-1];
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import TypeMPI from '../type/mpi.js';
|
import type_mpi from '../type/mpi.js';
|
||||||
import util from '../util.js';
|
import util from '../util.js';
|
||||||
const nodeCrypto = util.detectNode() && require('crypto');
|
const nodeCrypto = util.detectNode() && require('crypto');
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export default {
|
||||||
randomBits.charCodeAt(0)) +
|
randomBits.charCodeAt(0)) +
|
||||||
randomBits.substring(1);
|
randomBits.substring(1);
|
||||||
}
|
}
|
||||||
var mpi = new TypeMPI();
|
var mpi = new type_mpi();
|
||||||
mpi.fromBytes(randomBits);
|
mpi.fromBytes(randomBits);
|
||||||
return mpi.toBigInteger();
|
return mpi.toBigInteger();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user