Socket
Book a DemoInstallSign in
Socket

stunning-secure-string

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stunning-secure-string

a good looking crypto random string to use for things like API keys

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
102
-60.77%
Maintainers
1
Weekly downloads
 
Created
Source

Stunning Secure String

A good looking crypto random string to use for things like API keys.
Looks similar to the Stripe API key.

Usage

For use in Node

npm install stunning-secure-string

secureString(prefix, byteSize)

const { secureString } = require('stunning-secure-string');
const token = secureString();
// FV6G7LR9Ng9hUZZNvfEZUJRU13lPVlKJ23qKPXNOmpE3F1rmrjwU9Wx9NdFLJsC0nLEOHi88RPsX7SB4kdWY99PDXqViIuQ0Q

// or add a size
const token = secureString("", 14)
// tmii7akxzZGt1ayEYk

// or add prefix
const token = secureString("sk_live", 64)
// sk_live_iXI8GYgE7BBpIshv2k6VxIqxu7q5jSoPrZjslVT6hgTLfxMxRGWU7jrpt5hbHyi6ZNXTS09qFBQfcW6YMwFw

Test

npm run test

Keywords

crypto

FAQs

Package last updated on 04 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.