Skip to content

K9Crypt/module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K9Crypt Algorithm

This is a special encryption algorithm created for K9Crypt.

Updates

v1.1.7

  • The Argon2 hashing system has now been integrated, offering support for both SHA512 and Argon2.
  • Encryption performance has been optimized, significantly increasing speed.

Installation

bun add k9crypt
# npm install k9crypt
# pnpm add k9crypt
# yarn add k9crypt

Usage

const k9crypt = require('k9crypt');

async function test() {
  const secretKey = 'VeryLongSecretKey!@#1234567890';
  const encryptor = new k9crypt(secretKey);
  // Or you can use it without providing a secretKey value. A key will be generated by the system.
  // const encryptor = new k9crypt();
  const plaintext = 'Hello, World!';

  try {
    const encrypted = await encryptor.encrypt(plaintext);
    console.log('Encrypted data:', encrypted);

    const decrypted = await encryptor.decrypt(encrypted);
    console.log('Decrypted data:', decrypted);
  } catch (error) {
    console.error('Encryption error:', error);
  }
}

test();

License

This project is licensed under the MIT license.

About

A special encryption algorithm created for K9Crypt.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •