# ccmh

> Complete Cryptographic Module Handler

Latest version **1.0.7** (published 2022-11-25) · None license · 0 weekly downloads

## Install

```sh
npm install ccmh
pnpm add ccmh
yarn add ccmh
bun add ccmh
```

## 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.0.7 |
| Published | 2022-11-25 |
| First published | 2022-11-06 |
| Weekly downloads | 0 |
| License | None |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ruthvikc27dev |
| Maintainers | ruthvikc27dev |

## Links

- npm: https://www.npmjs.com/package/ccmh
- Repository: https://github.com/PlatformStarter/CEHM
- Homepage: https://github.com/PlatformStarter/CEHM#readme
- Issues: https://github.com/PlatformStarter/CEHM/issues
- npm.io page: https://npm.io/package/ccmh

## Dependencies (4)

- [bcrypt](https://npm.io/package/bcrypt.md) ^5.1.0
- [cryptr](https://npm.io/package/cryptr.md) ^6.0.3
- [typescript](https://npm.io/package/typescript.md) ^4.8.4
- [express-validator](https://npm.io/package/express-validator.md) ^6.14.2

## Recent versions

- 1.0.7 (latest) — 2022-11-25
- 1.0.6 — 2022-11-20
- 1.0.5 — 2022-11-20
- 1.0.4 — 2022-11-19
- 1.0.3 — 2022-11-19
- 1.0.2 — 2022-11-19
- 1.0.1 — 2022-11-19
- 1.0.0 — 2022-11-06

## README

# Complete Cryptographic Module Handler

#### Begin with -
1. yarn install

#### To execute -
1. npx tsc
2. node dist/app.js

#### Usage:

##### Encryption and Decryption -
```
import { Encrypt, Decrypt } from 'ccmh';

const main = async () => {
    const value = "passcode@12345";

    const encrypt = Encrypt.encryptValue(value, 10);
    (await encrypt).getEncryptedValue();

    console.log("value - " + value);
    console.log("Encrypted value - ", (await encrypt).getEncryptedValue());

    const decrypt = Decrypt.decryptValue(value, (await encrypt).getEncryptedValue() + "!");
    console.log("Decrypted value - ", (await decrypt).checkIsValid());
};

main();
```

#### Tokenization and Detokenization
```
const PAN = "1234 4567 9101 2345";
console.log("PAN - ", PAN);

const token = new Tokenize(PAN, { secret: "secret" });
const tokenized = token.getToken();
console.log("Tokenized PAN - ", tokenized);

const detoken = new Detokenize(tokenized, { secret: "secret" });
console.log("Detokenized PAN - ", detoken.getDeToken());
```

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