https://github.com/drazail/crypto-react
https://github.com/drazail/crypto-react
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/drazail/crypto-react
- Owner: Drazail
- License: other
- Created: 2023-01-31T15:23:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T22:41:47.000Z (over 2 years ago)
- Last Synced: 2024-04-25T06:21:46.170Z (over 1 year ago)
- Language: JavaScript
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# crypto-react
JavaScript implementations of standard and secure cryptographic algorithms for react
- [instalation](https://github.com/Drazail/crypto-react/blob/main/README.md#Getting-started)
- [simple usecase](https://github.com/Drazail/crypto-react/blob/main/README.md#usage)
- functions
- [hash](https://github.com/Drazail/crypto-react/wiki/hash)
- [Hmac](https://github.com/Drazail/crypto-react/wiki/Hmac)
- hooks
- [useHash](https://github.com/Drazail/crypto-react/wiki/useHash)
- [useHmac](https://github.com/Drazail/crypto-react/wiki/useHmac)
- namespaces
- [HashAlgorithms](https://github.com/Drazail/crypto-react/wiki/HashAlgorithms)
- [HmacAlgorithms](https://github.com/Drazail/crypto-react/wiki/HmacAlgorithms)
- [Encoders](https://github.com/Drazail/crypto-react/wiki/Encoders)
- interfaces
- [WordArray](https://github.com/Drazail/crypto-react/wiki/WordArray)
- [useHashConfig](https://github.com/Drazail/crypto-react/wiki/useHashConfig)
- [useHmacConfig](https://github.com/Drazail/crypto-react/wiki/useHmacConfig)
- [HmacHasherHelper](https://github.com/Drazail/crypto-react/wiki/HmacHasherHelper)
- [HasherHelper](https://github.com/Drazail/crypto-react/wiki/HasherHelper)
- [Encoder](https://github.com/Drazail/crypto-react/wiki/Encoder)
## Getting started`$ npm install crypto-react --save`
---
## Usage
### hash
```javascript
import { hash, HashAlgorithms, Encoders } from 'crypto-react';
hash('Message', HashAlgorithms.SHA256, Encoders.hex).then((hashedMessage)=>console.log(hashedMessage));
```
***### hmac
```javascript
import { hmac, HmacAlgorithms, Encoders } from 'crypto-react';
hmac(
'Message',
'SecretKey',
HmacAlgorithms.HmacSHA256,
Encoders.hex,
).then((hmacMessage)=>console.log(hmacMessage));;```