An open API service indexing awesome lists of open source software.

https://github.com/marshallovski/asnk-vas1

little cryptographic algorithm for en- and decrypting text
https://github.com/marshallovski/asnk-vas1

crypto crypto-tools cryptography decryption decryption-algorithm encrypt encryption encryption-algorithm encryption-algorithms encryption-decryption text

Last synced: 3 months ago
JSON representation

little cryptographic algorithm for en- and decrypting text

Awesome Lists containing this project

README

        

# asnk-vas1
cryptographic algorithm for encrypting text, salt-based


Live playground

## Salt variants
you can use any other salt-generator, see other methods in `./utils/salt`


also, you can write your own, but important thing is - salt must be a number

## Possibilities
`vas-1` can be used in a browser, or a server.


Vas-1 uses `String.charCodeAt` and `String.fromCharCode` to transform characters. All characters could be encrypted (maybe).

# Usage example
```js
// in browser, don't forget to add `type="module"` to your
const asnk = new Asnk('vas-1');

import { cryptoRandomNumber } from "./utils/salt/cryptoRandomNumber.js";

const text = 'Hello, World!';
const salt = await cryptoRandomNumber();

const encryptedText = await asnk.encrypt({ text, salt });
console.log(encryptedText);
```

<b>Also, see `index.js`</b>