Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idleberg/node-wp-salts
Generates an object of default WordPress salts. Fully offline.
https://github.com/idleberg/node-wp-salts
cryptography nodejs wordpress wordpress-salt
Last synced: 28 days ago
JSON representation
Generates an object of default WordPress salts. Fully offline.
- Host: GitHub
- URL: https://github.com/idleberg/node-wp-salts
- Owner: idleberg
- License: mit
- Created: 2019-03-17T22:48:52.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T21:59:49.000Z (3 months ago)
- Last Synced: 2024-10-09T13:15:44.742Z (about 1 month ago)
- Topics: cryptography, nodejs, wordpress, wordpress-salt
- Language: TypeScript
- Homepage:
- Size: 898 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-salts
> Generates an object of default WordPress salts. Fully offline.
[![License](https://img.shields.io/github/license/idleberg/node-wp-salts?color=blue&style=for-the-badge)](https://github.com/idleberg/node-wp-salts/blob/main/LICENSE)
[![Version: npm](https://img.shields.io/npm/v/wp-salts?style=for-the-badge)](https://www.npmjs.org/package/wp-salts)
[![Version: jsr](https://img.shields.io/jsr/v/@idleberg/wordpress-salts?style=for-the-badge)](https://jsr.io/@idleberg/wordpress-salts)
[![CI: Node](https://img.shields.io/github/actions/workflow/status/idleberg/node-wp-salts/node.yml?logo=nodedotjs&logoColor=white&style=for-the-badge)](https://github.com/idleberg/node-wp-salts/actions/workflows/node.yml)
[![CI: Deno](https://img.shields.io/github/actions/workflow/status/idleberg/node-wp-salts/deno.yml?logo=deno&logoColor=white&style=for-the-badge)](https://github.com/idleberg/node-wp-salts/actions/workflows/deno.yml)## Installation
`npm install wp-salts -S`
## Usage
`wpSalts(keys: string | string[], length?: number)`
**Example:**
```js
import { wpSalts } from 'wp-salts';// Standard WordPress salts
wpSalts();// Custom salts
wpSalts('SECURE_AUTH_KEY');
wpSalts(['AUTH_KEY', 'AUTH_SALT'], 128);
```**Note:** The minimum length of each salt is 8-bit (64 characters)
## Related
- [wp-salts-cli](https://www.npmjs.com/package/wp-salts-cli)
- [vscode-wordpress-salts](https://marketplace.visualstudio.com/items?itemName=idleberg.wordpress-salts)## License
This work is licensed under [The MIT License](LICENSE).