npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aes-bcrypt

v0.0.7

Published

SDK

Readme

Usage

idCardHash

// 生成身份证号 或者 姓名 Hash 值
const AESBCRYPT = require('aes-bcrypt');
const hash = AESBCRYPT.idCardHash('idcard or name', 'aes key(string length must be 16)')
// hash => '70f6cf9dc539d1e6c98151a8833e61827b7454cffb300d368309b184bae4ba6d'

phoneHash

// 生成手机号 Hash 值和盐值
const AESBCRYPT = require('aes-bcrypt');
// 同步方法
const phoneData = AESBCRYPT.phoneHash('idcard or name')
// 异步方法
AESBCRYPT.phoneHash('idcard or name', true).then(function(phoneData){
	console.log(phoneData)
})
// phoneData => {salt: '$2a$12$t/OvASEQwGT.XPc89oOdLe', hash: '$2a$12$uTasXyBru23f5RA4cXbACeGgZvYXX59D5jw0FrsmjF5QBzeXmLT7y'}

getApiKey

// 接口参数 apiKey 实例化方法
const AESBCRYPT = require('aes-bcrypt');
const apikey_cncert = "4iVc2EZnT5JURFHuiopLc7MP3tSs6zhXjhCxqe6xqKLG";
const sourceCode_cncert = "XXXX0000000000000";
const version = "1.5";
const apiKey = AESBCRYPT.getApiKey(apikey_cncert, sourceCode_cncert, version)
// apiKey => {apiKey: '0e355a2d94eb5dc867d715abc610be54ff47da39a3fc164027824cd650e4d529',timestamp: 1556034955792,nonce: '3654a64c'}

batchNumber

// 生成批次号
const AESBCRYPT = require('aes-bcrypt');
const sourceCode_cncert = "XXXX0000000000000";
const tradeDate = "20190423";
const seqNum = 1;
const seqId = Date.now();
const batchNum = AESBCRYPT.batchNumber(sourceCode_cncert, tradeDate, seqNum, seqId)
// batchNum => 'XXXX0000000000000_201904231_1556034975822'

checkCode

// 生成验证码
const AESBCRYPT = require('aes-bcrypt');
const msgs = Date.now();
const checkCode = AESBCRYPT.checkCode(msgs)
// checkCode => '148bab67775fa7e0677215fb73f7aee7'

idCardInfo

// 根据身份证号获取用户性别和年龄
const AESBCRYPT = require('aes-bcrypt');
const info = AESBCRYPT.idCardInfo('身份证号码')
// info => {
    // valid: true,//身份证是否合法的标志
	// gender: 'M',//M->男,F->女
	// birthday: 19910210,//
	// province: {
	// 	code: '440000',//行政区域编码
	// 	text: '广东省' 
	// },
	// city: { 
	// 	code: '440800', 
	// 	text: '湛江市' 
	// },
	// area: { 
	// 	code: '440882', 
	// 	text: '雷州市' 
	// },
	// cardType: 1,//身份证类型,1->大陆,2->港澳台
	// cardText: '大陆',
	// address: '广东省湛江市雷州市',
	// age:24,
    // constellation:'水瓶'//星座 
// }

getIdcardAscription

// 根据身份证号获取身份所属地
const AESBCRYPT = require('aes-bcrypt');
const code = AESBCRYPT.getIdcardAscription('身份证号码')
// code => '110114'

getPhoneAscription

// 获取手机号码所属地
const AESBCRYPT = require('aes-bcrypt');
const code = AESBCRYPT.getPhoneAscription('13800138000')
// code => '110100'

getCompanyAscription

// 当用户类型为企业时根据三证合一号获取企业注册地址
const AESBCRYPT = require('aes-bcrypt');
const code = AESBCRYPT.getCompanyAscription('企业组织代码/三证合一代码')
// code => '510100'