New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oprf

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oprf - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

dist/oprf.js.map

6

dist/oprf.d.ts

@@ -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

20

dist/oprf.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc