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
- Host: GitHub
- URL: https://github.com/marshallovski/asnk-vas1
- Owner: marshallovski
- License: mpl-2.0
- Created: 2025-02-04T15:44:18.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-04T16:07:51.000Z (5 months ago)
- Last Synced: 2025-02-04T16:45:23.551Z (5 months ago)
- Topics: crypto, crypto-tools, cryptography, decryption, decryption-algorithm, encrypt, encryption, encryption-algorithm, encryption-algorithms, encryption-decryption, text
- Language: JavaScript
- Homepage: https://marshallovski.github.io/asnk-vas1/
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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>