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: 6 months ago
JSON representation

Generates an object of default WordPress salts. Fully offline.

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)
![GitHub branch check runs](https://img.shields.io/github/check-runs/idleberg/node-wp-salts/main?style=for-the-badge)

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