Comparing version 0.9.0 to 0.9.1
@@ -54,8 +54,2 @@ import BN = require('bn.js'); | ||
/** | ||
* Converts the input to a binary string | ||
* @param input | ||
* @returns {string} a string of 0's and 1's representing the original input | ||
*/ | ||
private stringToBinary; | ||
/** | ||
* Converts a number to its binary representation | ||
@@ -62,0 +56,0 @@ * @param n |
@@ -22,3 +22,3 @@ "use strict"; | ||
OPRF.prototype.hashToPoint = function (input) { | ||
var hash = this.stringToBinary(input); | ||
var hash = this.sodium.crypto_generichash(64, this.sodium.from_string(input)); | ||
var addressPool = []; | ||
@@ -106,20 +106,2 @@ var result = new tools_1.AllocatedBuf(this.sodium, this.sodium.libsodium._crypto_core_ed25519_uniformbytes()); | ||
/** | ||
* Converts the input to a binary string | ||
* @param input | ||
* @returns {string} a string of 0's and 1's representing the original input | ||
*/ | ||
OPRF.prototype.stringToBinary = function (input) { | ||
var result = []; | ||
for (var i = 0; i < input.length; i++) { | ||
var binaryArr = this.numToBin(input.charCodeAt(i)); | ||
result = result.concat(binaryArr); | ||
} | ||
var resultString = ''; | ||
for (var _i = 0, result_1 = result; _i < result_1.length; _i++) { | ||
var res = result_1[_i]; | ||
resultString += res; | ||
} | ||
return resultString; | ||
}; | ||
/** | ||
* Converts a number to its binary representation | ||
@@ -126,0 +108,0 @@ * @param n |
@@ -0,0 +0,0 @@ export declare class AllocatedBuf { |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "oprf", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Oblivious pseudo-random function over an elliptic curve (ED25519)", | ||
@@ -10,2 +10,5 @@ "main": "dist/oprf.js", | ||
}, | ||
"files": [ | ||
"/dist" | ||
], | ||
"scripts": { | ||
@@ -48,2 +51,3 @@ "build": "tsc", | ||
"nyc": "^12.0.2", | ||
"sinon": "^6.3.5", | ||
"source-map-support": "^0.5.6", | ||
@@ -50,0 +54,0 @@ "ts-loader": "^4.4.2", |
@@ -0,0 +0,0 @@ # OPRF |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
1
25634
16
9
371