Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc4

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc4 - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "rc4",
"version": "0.1.1",
"version": "0.1.2",
"description": "RC4 random number generator",

@@ -5,0 +5,0 @@ "main": "rc4.js",

@@ -17,3 +17,8 @@ "use strict";

function seed(key) {
if (typeof key === "string") {
if (key === undefined) {
key = new Array(N);
for (var k = 0; k < N; k++) {
key[k] = Math.floor(Math.random() * N);
}
} else if (typeof key === "string") {
// to string

@@ -20,0 +25,0 @@ key = "" + key;

@@ -16,2 +16,3 @@ # rc4

var generator = new RC4("my seed"); // string or array of integers
// without the seed RNG is seeded with random data from Math.random

@@ -18,0 +19,0 @@ // byte := integer ∈ [0, 255]

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