New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

my-crypto

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

my-crypto

数据加密

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

my-crypto

Installation

This module is designed to be used using either browserify or Node.js it's released in the public npm registry and can be installed using:

npm install my-crypto

Usage

All examples assume that this library is bootstrapped using:

//加密一 已废弃
//加密数据
const {aseEncode} = require('my-crypto');
let data="测试数据",password:'mypass'
let encryptedStr=aseEncode(data,password);
console.log(`加密后的数据:${encryptedStr}`);

//解密数据
const {aseDecode} = require('my-crypto');

let newData=aseDecode(encryptedStr,password);
console.log(`解密后的数据:${newData}`);

//加密二
//加密数据
const {cryptoEncode} = require('my-crypto');
let data="测试数据",key='bc3891deea785e61',iv='80ef89cf94e6416d';
let encryptedStr=cryptoEncode(data,key,iv);
console.log(`加密后的数据:${encryptedStr}`);

//解密数据
const {cryptoDecode} = require('my-crypto');

let newData=cryptoDecode(encryptedStr,key,iv);
console.log(`解密后的数据:${newData}`);

License

MIT

Keywords

my-crypto

FAQs

Package last updated on 17 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts