mipher1.1.5 • Public • Published
Mobile Cipher crypto library written in clean TypeScript
Highligths and design goals
There are a lot of crypto libs in JS around, but I needed a clean, lightweight, reliable, fast and simple lib for mobile devices in TypeScript. That's mipher.
A collection of common crypto algorithms, optimized for speed, security and size.
- Only usage of modern typed arrays like
Uint32Arrayas message/data types
- Fast and simple, no dependencies
- Own crypto random generator (using a FORTUNA implementation)
- Extensive passing test suite
- MIT license
- Curve25519, Ed25519
- SHA-1, SHA-256, SHA-512, SHA-3, Keccak, SHAKE
- Random generator
- Blockmodes (ECB, CBC, CTR)
- Padding (PKCS5, PKCS7, zero padding)
- Format converter (bin, number, hex, base64, string)
- Utils (xor, cryptocompare etc.)
Import the mipher module as
mipher and create your according crypto object:
mipher is using the mocha test suite for testing.
To do all tests just run
npm run test.
If you find any bugs, have any comments, improvements or suggestions:
- Create an issue and describe your idea
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Publish the branch (
git push origin my-new-feature)
- Create a new pull request
- Profit! ✅
mipher is written under the MIT license.