# node-ts-crypto-promise

> Promise style crypto module base on nodejs 'crypto' module written in TypeScript.

Latest version **0.1.2** (published 2017-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-ts-crypto-promise
pnpm add node-ts-crypto-promise
yarn add node-ts-crypto-promise
bun add node-ts-crypto-promise
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2017-01-24 |
| First published | 2017-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | HappyXiaox |
| Maintainers | weizehua0403 |
| Keywords | TypeScript, node, crypto, promise |

## Links

- npm: https://www.npmjs.com/package/node-ts-crypto-promise
- Repository: https://git.oschina.net/Happyxx/node-ts-crypto-promise
- npm.io page: https://npm.io/package/node-ts-crypto-promise

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^7.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2017-01-24
- 0.1.0 — 2017-01-21
- 0.0.1 — 2017-01-21

## README

#node-ts-crypto-promise

## 安装

    npm install node-ts-crypto-promise
    
## 使用方法

#### 使用Promise
```typescript
import {Crypto} from "node-ts-crypto-promise"

let data = Crypto.hash('1234567980', 'SHA256').toString('hex');
// data === c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646
```

#### 使用async/await
```typescript
import {Crypto} from "node-ts-crypto-promise"

async function someFunction() {
    let data = await Crypto.hash('1234567980', 'SHA256').toString('hex');
    // data === c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646}
}
```

## APIS:
目前只实现了以下API：
* Crypto.hash
* Crypto.hmac
* Crypto.randomBytes
* Crypto.ciphers
* Crypto.hashes

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