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

pseudo-crypto

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pseudo-crypto

pseudo-crypto

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
0
Weekly downloads
 
Created
Source

Pseudo Crypto

Pseudo Crypto can help you hash numeric identifiers.

Installation

npm i pseudo-crypto

Usage

const { PseudoCrypto } = require('pseudo-crypto')
// import { PseudoCrypto } from 'pseudo-crypto'

const pc = {
  numeric: new PseudoCrypto('09'),
  uppercase: new PseudoCrypto('AZ'),
  lowercase: new PseudoCrypto('az'),
  lowercase_wide: new PseudoCrypto('l-'),
  lowercase_inline: new PseudoCrypto('l_'),
  alphabetic: new PseudoCrypto('Az'),
  alphanumeric: new PseudoCrypto('AN') // default
}
console.log([
  pc.numeric.hash(12345),               // 81485
  pc.uppercase.hash(12345, 6),          // QJQYJR
  pc.lowercase.hash(12345, 8),          // qjpsdsql
  pc.lowercase_wide.hash(12345, 10),    // rerrowgbkd
  pc.lowercase_inline.hash(12345, 12),  // ueoevwcxavec
  pc.alphabetic.hash(12345, 14),        // gmVcZTCcUhvqOF
  pc.alphanumeric.hash(12345, 16)       // d29BtQouSWVtnhIX
].join('\n'))

Keywords

FAQs

Package last updated on 15 Sep 2024

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

  • 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