Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 32 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
## How to use this package n-krypta

This package allows you to encrypt and decrypt short strings using a key. It is based on the [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) algorithm.
## How to use n-krypta package

### Installation

```bash
npm install n-krypta or yarn add n-krypta
```

```
for typescript
npm install @types/n-krypta or yarn add @types/n-krypta
```javascript
npm install n-krypta --save or yarn add n-krypta
```

### Usage

```javascript
const crypta = require('n-rypta');
const { encrypt, decrypt } = require('n-krypta');

const key = 'my secret key'; // more than 16 characters is recommended, make sure it is the same for encryption and decryption and also kept secret
const text = 'my secret text';
const secret = 'secret'; // secret key for encryption

const encrypted = crypta.encrypt(text, key);
const decrypted = crypta.decrypt(encrypted, key);
const encrypted = encrypt('Hello World', secret); // encrypts the string

\`\`\`
const decrypted = decrypt(encrypted, secret); // decrypts the string

### API
console.log(encrypted); // prints the encrypted string

#### encrypt(text, key)
console.log(decrypted); // prints the decrypted string
```

Encrypts the given text using the given key.
### License

#### decrypt(encrypted, key)
MIT

Decrypts the given encrypted text using the given key.
### Author

### License
Samuel Egbajie (CodePapi on Github)

MIT
### Contributing

## How to use this package crypta
Contributions are welcome. Please open an issue or a pull request.

This package allows you to encrypt and decrypt short strings using a key. It is based on the [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard) algorithm.
### Disclaimer

### Installation
This package is not meant to be used for production. It is just a simple package for encrypting and decrypting strings.

```bash
npm install n-krypta
```
### Keywords

encrypt, decrypt, hash,

### Version

1.0.0

### Repository

(https://github.com/CodePapi/n-krypta)[https://github.com/CodePapi/n-krypta]

### Homepage

(https://github.com/CodePapi/n-krypta)[https://github.com/CodePapi/n-krypta]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"^.+\\.tsx?$": "ts-jest"
}
},
"keywords": [],
"keywords": ["encrypt", "decrypt", "n-krypta", "hash", "hashing", "encryption", "decryption"],
"author": "Samuel Egbajie",
"license": "ISC",
"bugs": {
Expand Down