GithubHelp home page GithubHelp logo

nodejs_package_usage's Introduction

NODEJS_PACKAGE_USAGE

用于记录使用过的 nodejs 包使用方法。

目录(点击链接直达):

加密解密

名称 简介 主页
abab BASE64 加密解密
md5 md5 字符串/文件加密

abab

BASE64 加密解密

安装方法:

npm install abab

使用方法:

btoa (base64 加密)

const { btoa } = require('abab');
btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ=='

atob (base64 解密)

const { atob } = require('abab');
atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'

md5

MD5 加密

安装方法:

npm install md5

使用方法:

var md5 = require('md5');
console.log(md5('message')); // 78e731027d8fd50ed642340b7c9a63b3

支持 buffer 流,比如文件 md5

var fs = require('fs');
var md5 = require('md5');
fs.readFile('example.txt', function(err, buf) {
    console.log(md5(buf));
});

nodejs_package_usage's People

Contributors

mrhuo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.