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: 6 months 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 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T21:59:49.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T16:33:27.359Z (over 1 year 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.
[](https://github.com/idleberg/node-wp-salts/blob/main/LICENSE)
[](https://www.npmjs.org/package/wp-salts)
[](https://jsr.io/@idleberg/wordpress-salts)

## 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).