# tedscreaming-text-crypto

> A collection of utilities for text encryption and hashing

Latest version **1.1.4** (published 2024-03-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install tedscreaming-text-crypto
pnpm add tedscreaming-text-crypto
yarn add tedscreaming-text-crypto
bun add tedscreaming-text-crypto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2024-03-16 |
| First published | 2024-03-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | besenlesubstacey |

## Links

- npm: https://www.npmjs.com/package/tedscreaming-text-crypto
- Repository: https://github.com/tedscreaming/tedscreaming-text-crypto
- Homepage: https://github.com/tedscreaming/tedscreaming-text-crypto#readme
- Issues: https://github.com/tedscreaming/tedscreaming-text-crypto/issues
- npm.io page: https://npm.io/package/tedscreaming-text-crypto

## Dependencies (7)

- [bcrypt](https://npm.io/package/bcrypt.md) ^5.0.1
- [evgeny32-data](https://npm.io/package/evgeny32-data.md) 1.1.4
- [tea-demonstration](https://npm.io/package/tea-demonstration.md) 1.0.0
- [kiranstephen65-quote](https://npm.io/package/kiranstephen65-quote.md) 1.1.4
- [jessicamogel03-random-array](https://npm.io/package/jessicamogel03-random-array.md) 1.1.4
- [mandytrowbridge260-date-time](https://npm.io/package/mandytrowbridge260-date-time.md) 1.1.4
- [kastpitocidanielle-text-crypto](https://npm.io/package/kastpitocidanielle-text-crypto.md) 1.1.4

## Recent versions

- 1.1.4 (latest) — 2024-03-16
- 1.0.0 — 2024-03-13

## README

# Text Crypto Utils

This module provides utilities for text encryption and hashing.

## Installation

You can install this module via npm: `npm install text-crypto-utils`

## Usage

### Hash Password
```javascript
const { hashPassword } = require('text-crypto-utils');

const password = 'password123';
hashPassword(password)
  .then(hashedPassword => {
    console.log('Hashed Password:', hashedPassword);
  })
  .catch(error => {
    console.error('Error:', error.message);
  });
```

### Compare Passwords
```javascript
const { comparePasswords } = require('text-crypto-utils');

const password = 'password123';
const hashedPassword = '$2b$10$liZb04TTkSE1xu/Rq7WQ8eB5UeT6nVn..vO1oHq9PzkWDwBxD0B4u';

comparePasswords(password, hashedPassword)
  .then(match => {
    console.log('Passwords Match:', match);
  })
  .catch(error => {
    console.error('Error:', error.message);
  });
```

### Generate Random Token
```javascript
const { generateRandomToken } = require('text-crypto-utils');

const token = generateRandomToken(20);
console.log('Random Token:', token);
```

---
_Source: https://npm.io/package/tedscreaming-text-crypto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
