# node-ts-crypto-promise **Repository Path**: Happyxx/node-ts-crypto-promise ## Basic Information - **Project Name**: node-ts-crypto-promise - **Description**: Promise style crypto module base on nodejs 'crypto' module written in TypeScript. Promise风格的crypto。用TypeScript写的,基于nodejs的crypto模块。 - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-01-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #node-ts-crypto-promise ## Installation npm install node-ts-crypto-promise ## Usage #### Using promise ```typescript import {Crypto} from "node-ts-crypto-promise" let data = Crypto.hash('1234567980', 'SHA256').toString('hex'); // data === c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646 ``` #### Using 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: Only following API is implemented currently: * Crypto.hash * Crypto.hmac * Crypto.randomBytes * Crypto.ciphers * Crypto.hashes