{"_id":"secure-random-string","_rev":"14-eb8a1302179730ef1e1495fa8eb80987","name":"secure-random-string","dist-tags":{"latest":"1.1.4"},"versions":{"0.0.2":{"name":"secure-random-string","version":"0.0.2","keywords":["secure","random","string"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@0.0.2","maintainers":[{"name":"s2","email":"git@31337.it"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"c11102820a595723ea9c563ce83f4ef27b515ad3","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-0.0.2.tgz","integrity":"sha512-l8HXwDEpkcQYxgamZPT0g6CNR6B5ZmBuDjv8redVM7Rv0me7A1PM1xIVM4AyxANaKfmxZ/hoLE+ONR8wt/5j4w==","signatures":[{"sig":"MEQCIC61UH0SFX9/RbTNsTmHJ0veWWblImTxwLUZzp6uSyfYAiBy3PdretvxkbV9bglySMW3r0D+p6y8jxCSa+1rSCXU9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/secure-random-string.js","_from":".","_shasum":"c11102820a595723ea9c563ce83f4ef27b515ad3","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"git@31337.it"},"repository":{"url":"https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"1.4.9","description":"Generates a secure random string with a given length","directories":{}},"0.1.0":{"name":"secure-random-string","version":"0.1.0","keywords":["secure","random","string"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@0.1.0","maintainers":[{"name":"s2","email":"git@31337.it"}],"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"aec001e783432a6e3c1a5eb08d4be86024e8eb97","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-0.1.0.tgz","integrity":"sha512-NUpyVXkhOd/+Y0eg/oMitJ1Y7bExfRzH0luQcSeegu4ZHc+rONLRme7KBzPb69Fx3ODkZjbpgzRfOguQh4Em9w==","signatures":[{"sig":"MEYCIQDLsCTfwzZhQ8nQX15zKpGDaEJFhtC/3bv1lbmgFb1QQgIhAJ+Q68GuXXAcqpvUao/dItY+Liy/C7vPg2E4PuR5YMxi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/secure-random-string.js","_from":".","_shasum":"aec001e783432a6e3c1a5eb08d4be86024e8eb97","gitHead":"6d46d068ccbcaa14479df7e0372ed4e54627712e","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"git@31337.it"},"repository":{"url":"https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"1.4.28","description":"Generates a secure random string with a given length","directories":{}},"1.0.0":{"name":"secure-random-string","version":"1.0.0","keywords":["crypto","cryptography","secure","random","string","token"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@1.0.0","maintainers":[{"name":"s2","email":"git@31337.it"}],"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"fef5f0d809ed25f04e303ed801947956800de41a","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-1.0.0.tgz","integrity":"sha512-Kg/3tnMqLGIMBn2fzNC0D7mGzyJQ7vxlkKqUvbqIxkyTvogpasAd9AyFPNiySMYCQyUYmzcdGiYfYJuGFfmR1Q==","signatures":[{"sig":"MEQCIHRz+WRq63fF/I9yVbo/CRwrQoAMAogtwGRqfW8119FTAiAPZ0/Lhr2lFFUFPnAbDMAQCeRx2JzbfU+xtsWSDfw+jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/secure-random-string.js","_from":".","_shasum":"fef5f0d809ed25f04e303ed801947956800de41a","gitHead":"645d64b940f9f6aad54562ef0958253c2af199f0","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"git@31337.it"},"repository":{"url":"git+https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"2.11.3","description":"Generates a secure random string with a given length","directories":{},"_nodeVersion":"0.12.7"},"1.1.0":{"name":"secure-random-string","version":"1.1.0","keywords":["crypto","cryptography","secure","random","string","token"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@1.1.0","maintainers":[{"name":"s2","email":"git@31337.it"}],"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"c47d2f20b6d93db1255edb4dadf5e03188ab978e","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-1.1.0.tgz","integrity":"sha512-V/h8jqoz58zklNGybVhP++cWrxEPXlLM/6BeJ4e0a8zlb4BsbYRzFs16snrxByPa5LUxCVTD3M6EYIVIHR1fAg==","signatures":[{"sig":"MEQCID574M+eLYL3C8SD5ewMb9PSTlgEoqZxPICVbCQ6PeBUAiBTyF1WT378ahx/HttDY7uiDVHWFNVcI3SCtygh0F64cg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/secure-random-string.js","gitHead":"9fa7f94d579719ae27fbf870a1ac1d0100e4fd6d","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"git@31337.it"},"repository":{"url":"git+https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"5.5.1","description":"Generates a secure random string with a given length","directories":{},"_nodeVersion":"8.9.1","_npmOperationalInternal":{"tmp":"tmp/secure-random-string-1.1.0.tgz_1511693740286_0.7388487078715116","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"secure-random-string","version":"1.1.2","keywords":["crypto","cryptography","secure","random","string","token"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@1.1.2","maintainers":[{"name":"s2","email":"git@31337.it"}],"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"9cade0678acff7eeaf4517d110ea29e66530ebdc","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-1.1.2.tgz","fileCount":6,"integrity":"sha512-o5aaoY4mEh209vOmt4wkUMF/uxGJV87ImeQdv1BnVQ7TOjemUiT6xgED3VpHTGz2AlmMfqBxS8C+UMZAxSOATA==","signatures":[{"sig":"MEQCIEpwGM/NylwPfOIlS9JlcixZNBOwNyTuP/BfAFzfxOFOAiBUJJWgCtzIpEHKWKBFmnbL2l4Zc9hsfv+sFeHU1Et93A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKeBkCRA9TVsSAnZWagAA5M0P/3FT1t0JmLQcy+scU9Us\n40tfCsd/Q/jSQ8tu4fFSetcQTBe2NC2T7qxpm93eG8kdzkhsLRXcKUhohEt1\n7hL+NupNZYbOOqgfhh0HOaJXqCL4UL/+KJdvpgBxJ+Ve6XUKJJXt9Gk553IY\nbftqJur2n6jUjXwz3NkGnBvES/w/CcQOLJv91WnVUNzrF/Bmign2cZ1y2Vma\niQptg9gEqe11fo3m8XGk5WPWPXA7Xp6aFwIQwG04rvps4rmKPpedmXf0XjvP\nOB7yP73N+0Cia+9zDWSzxu8kQ9pP2qMQQZlVEgE8iyawSXLiyHqa1Xf2gK3d\npieoy/fsP4p3Ln1RuP2pO3ybjG2k9RAVjN2aA6BhUoyB1+EGTl0KezyyJO3H\n0rkLGs0tYMe7VAWWimXz2i9BZgXGUPg7IBLU7jhjEYorzdu1ktI4L7KJHtN4\nyVyRSIJ3CshKJlyFksJhaZ9mOUxTgKUlbsKWuR+Htrh6rXXvgZPmxtY6/7iv\noXw0TO5b6jxcTvtlV+ugR1cFt+GfJV+fY0wTGGjbWxP/kFII1jGQlMxhaZ9m\npgykBj5bP6eR2UbIrHDokZ5GsBrjDmipLAI/0hmUJ5O7++yJ6HHPWDSuKM55\nowwyFykS72x9BwjmB1B3ih6SU3Wvyf6oZ9m8BS22q8FpBZvjHLpLS/bu0wWs\nPhRu\r\n=109H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/secure-random-string.js","gitHead":"94f2eadf639a48efb15a99137d6c371066ba9d10","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"s2@31337.it"},"repository":{"url":"git+https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"6.9.0","description":"Generates a secure random string with a given length","directories":{},"_nodeVersion":"8.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secure-random-string_1.1.2_1563025508279_0.5248718549576061","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"secure-random-string","version":"1.1.3","keywords":["crypto","cryptography","secure","random","string","token"],"author":{"name":"Simon Santoro"},"license":"MIT","_id":"secure-random-string@1.1.3","maintainers":[{"name":"s2","email":"git@31337.it"}],"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"homepage":"https://github.com/S2-/securerandomstring","bugs":{"url":"https://github.com/S2-/securerandomstring/issues"},"dist":{"shasum":"8076279d3450cd52948b890849a95d38a25362e3","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-1.1.3.tgz","fileCount":6,"integrity":"sha512-298HxkJJp5mjpPhxDsN26S/2JmMaUIrQ4PxDI/F4fXKRBTOKendQ5i6JCkc+a8F8koLh0vdfwSCw8+RJkY7N6A==","signatures":[{"sig":"MEYCIQCwr0sxmov6lWjnPj2oBX2RneeQtM4FNAS1JlyJNKf+4AIhALelpUxRbNQ+f57PL4BZ4dQSSwyvcMZlw/rN6TOqSYZx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejfm+CRA9TVsSAnZWagAAxhAP/0bxH5W2pxgMK3xGRca2\ngRifPwQfMsZvymMFL/6aBaVpfD6gmaD0LjSbm+EiqTxqV1D918AQ2KRtfcf0\n8XT5tU0jFOXm21/Va0kdq6Icd3ovTqMrz0l5wWnr3pAEAO1ohwFryyHVCiAE\nLbFXbxY9+3uTAGg5uD3/Zm9f5WFD+LdTg6ZZ4SCZxf3f0errS1cZMH5tNlY5\nZk8FRwLuEN+EARU3wqnOjDjTONM4Fg6TkglsUAQ7WoW/XJmUZnSQDiIDlAmN\nXCYyk4T8kQrR+w7jgYvggPAC15h6qdEgRap78b1l5uZWY0zywomG6WLlffoi\nCQqcbM8OsB5CoG4nX+Hg0ZCBYEnpymOl9GnlJMMqAxv3emAaB7hCGupRIYbA\n7jHXOIvnD1EvxBJinkvLA+Dk6Li88bxXjFY1glvAM54vMukSpcnEHUUgetez\neiieF4L/gc7S5CkRemFkN05FQd6pTmgIawqNJXBTwW7bn2xcMMWQzInhskA6\nSDDJcDDpBezhQqaKrS8o8xRo9J35mZaGtyrISo8Yuier7RlslZdKotnK5RPY\nOjV8R1KX+Zb8fBzIW4MOqqDSidxuYzeoh2ArucPZ/lLcs+CEm8bo1GB5NaTF\nyq/IEFiEzfW5M7r0OTiIyNJpwnYtoLpTxq5vIzTmm2gIUbLZorefrM4M1zRU\nSz24\r\n=9TVD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/secure-random-string.js","gitHead":"f7e565bcc7c661b98f9f29ab518b05134a33c695","scripts":{"test":"node tests.js"},"_npmUser":{"name":"s2","email":"s2@31337.it"},"repository":{"url":"git+https://github.com/S2-/securerandomstring.git","type":"git"},"_npmVersion":"6.14.3","description":"Generates a secure random string with a given length","directories":{},"_nodeVersion":"12.16.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/secure-random-string_1.1.3_1586362814232_0.43021312255643007","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"secure-random-string","version":"1.1.4","description":"Generates a secure random string with a given length","main":"lib/secure-random-string.js","scripts":{"test":"node tests.js"},"repository":{"type":"git","url":"git+https://github.com/5im-0n/securerandomstring.git"},"keywords":["crypto","cryptography","secure","random","string","token"],"author":{"name":"Simon Santoro"},"contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"license":"MIT","bugs":{"url":"https://github.com/5im-0n/securerandomstring/issues"},"homepage":"https://github.com/5im-0n/securerandomstring","_id":"secure-random-string@1.1.4","gitHead":"bed81137505068333f5cf5804a75d5157c630754","_nodeVersion":"22.7.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-wkl2kL6/eT0II0HvuRAGW3dunWwfFV81Rdueu8+we0smnJU1B/aEksngOsoACs6XUyVeeZAM4eJvprRuPs0PPQ==","shasum":"a2ce11069c8716762097dce114e237d3682adce6","tarball":"https://registry.npmjs.org/secure-random-string/-/secure-random-string-1.1.4.tgz","fileCount":6,"unpackedSize":7379,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYY2hKT+c/1/9Zp7LZ9Qfw/qup1SZWZkfn3qJfVKeeEwIgT8z/ms2XSsWS0MQGOfBGrP/EuPzZsVaVMz7Xfci+WvM="}]},"_npmUser":{"name":"s2","email":"s2@31337.it"},"directories":{},"maintainers":[{"name":"s2","email":"s2@31337.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/secure-random-string_1.1.4_1727350093472_0.4574006526621808"},"_hasShrinkwrap":false}},"time":{"created":"2015-04-25T14:32:43.991Z","modified":"2024-09-26T11:28:13.836Z","0.0.1":"2015-04-25T14:32:43.991Z","0.0.2":"2015-04-25T14:42:07.653Z","0.1.0":"2015-08-21T06:42:00.763Z","1.0.0":"2015-08-27T21:53:30.721Z","1.1.0":"2017-11-26T10:55:41.308Z","1.1.2":"2019-07-13T13:45:08.475Z","1.1.3":"2020-04-08T16:20:14.427Z","1.1.4":"2024-09-26T11:28:13.660Z"},"bugs":{"url":"https://github.com/5im-0n/securerandomstring/issues"},"author":{"name":"Simon Santoro"},"license":"MIT","homepage":"https://github.com/5im-0n/securerandomstring","keywords":["crypto","cryptography","secure","random","string","token"],"repository":{"type":"git","url":"git+https://github.com/5im-0n/securerandomstring.git"},"description":"Generates a secure random string with a given length","contributors":[{"name":"Mark Stosberg","email":"mark@rideamigos.com"}],"maintainers":[{"name":"s2","email":"s2@31337.it"}],"readme":"# secure-random-string\n\nNode.js module that generates a cryptographically secure random string with a given length\n\n## Usage\n\n```javascript\nvar srs = require('secure-random-string');\n```\n\n### Default behavior: Generate a random Base64 encoded string 32 characters long.\n\nThis may include alphanumeric characters as well as the following characters: +, /, =.\n\n```javascript\n// Sync\nvar result = srs();\n\n// Async\nsrs(function(err, sr) {\n\tconsole.log(sr);\n});\n\n```\n\n### Options: length\n\nOptionally, you can specify a 'length' option to specify a length.\n\n```javascript\n// sync\nvar result = srs({length: 256});\n\n// async\nsrs({length: 256}, function(err, sr) {\n\tconsole.log(sr);\n});\n```\n### Options: alphanumeric\n\nOptionally, you can specify a 'alphanumeric' option to get a alphanumerical chars only.\n\n```javascript\n// sync\nvar result = srs({alphanumeric: true});\n\n// async\nsrs({alphanumeric: true}, function(err, sr) {\n\tconsole.log(sr);\n});\n```\n## Error handling\n\n\nAn error is possible if there is not enough accumulated entropy to generate cryptographically strong data. In other words, this will not block even if all entropy sources are drained. Note that the sync API throws an exception, while\nthe async API returns the error to the callback.\n\n## Author\n\n [Simon Santoro](https://github.com/S2-)\n\n## Contributors\n\n [Mark Stosberg](https://github.com/markstos)  \n [Sandro Gomez](https://github.com/mrsangrin)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","readmeFilename":"README.md","users":{"markstos":true,"cooljesus":true}}