npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

anton-keygen-pro

v1.0.9

Published

πŸ”₯ Anton KeyGen Pro: A Powerful Utility for Generating Random Keys! πŸ”‘

Downloads

689

Readme

anton-keygen-pro πŸ”‘

anton-keygen-pro is a Node.js module designed to generate different types of keys with customizable formats. This module is perfect for developers who need reliable and random key generation for their applications.

Installation

To install this package, simply run the following command in your project directory:

npm install anton-keygen-pro

Usage

After installation, you can require the package and use it to generate different types of keys.

const anton = require('anton-keygen-pro');

console.log(anton.key1);  // Outputs an alphanumeric key
console.log(anton.key7);  // Outputs a random hexadecimal key
console.log(anton.key8);  // Outputs an encrypted key with salt

Example Output

{
  key1: '72QS-M6T0-R5DD-I8T7',
  key2: 'NQYK-ATMB-ECVF-SJFH',
  key3: '5010-4021-5079-6396',
  key4: 'QSFR-GO7O-TFG3',
  key5: 'XMFB-TEEH-EXEX',
  key6: '5959-8095-5886',
  key7: '11ebde6d3fb485b363ba88cb279bd49c',
  key8: 'iCN2/tCfQMjVVLydkMi9fg==:GmSV8GXCbE9DF3G0p35srL9Dcpj+CqO+TnS6zmZXYY1YznkVlynYLkzKiRLM1AlE:334TIJKjcldWBKnqW3pdOw=='
}

Key Types

  • key1: Alphanumeric key (e.g., 'A1B2-C3D4-E5F6-G7H8')
  • key2: Alphabetic key (e.g., 'ABCD-EFGH-IJKL-MNOP')
  • key3: Numeric key (e.g., '1234-5678-9101-1121')
  • key4: Custom alphanumeric key with 3 segments (e.g., 'A1B2-C3D4-E5F6')
  • key5: Custom alphabetic key with 3 segments (e.g., 'ABCD-EFGH-IJKL')
  • key6: Custom numeric key with 3 segments (e.g., '1234-5678-9101')
  • key7: Random hexadecimal key (e.g., '9f86d081884c7d659a2feaa0c55ad015')
  • key8: Encrypted key with salt and IV for enhanced security.

Explanation of Key8

  • key8: This key combines salt, an encrypted key, and an initialization vector (IV) generated using cryptographic algorithms. It is designed to enhance security in key management, ensuring that the key is not only randomly generated but also encrypted to protect sensitive data.

    Format of Key8:

    {salt}:{encryptedKey}:{iv}
    • salt: A random string used in the encryption process to strengthen security.
    • encryptedKey: The encrypted key, which makes it unreadable without the proper decryption.
    • iv: An initialization vector used in the encryption algorithm to ensure that the encryption results are unique even if the same key is used multiple times.

Example Usage of Key8

const anton = require('anton-keygen-pro');

const key8 = anton.key8;  // Generates an encrypted key
console.log(`Key 8: ${key8}`);

// Split the key components if needed
const [salt, encryptedKey, iv] = key8.split(':');
console.log(`Salt: ${salt}`);
console.log(`Encrypted Key: ${encryptedKey}`);
console.log(`IV: ${iv}`);

Error Handling

The module includes error handling to ensure that invalid parameters or key types are caught and reported:

try {
  const invalidKey = generateKey(0, 4, ''); // This will throw an error
} catch (error) {
  console.error('Failed to generate key:', error.message);
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! If you find any issues or have suggestions, feel free to submit a pull request or open an issue.

Testing

To run the tests, simply execute:

npm test