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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gdty/tylic-npm-sdk

v1.1.1

Published

## 介绍 `tylic-npm-sdk` 是一个用于许可证生成与验证的软件开发工具包(SDK),主要功能包括加密、解密、签名、验签以及获取机器唯一标识等。该 SDK 适用于需要进行软件授权管理的场景,提供了一套完整的工具类接口。

Readme

tylic-npm-sdk

介绍

tylic-npm-sdk 是一个用于许可证生成与验证的软件开发工具包(SDK),主要功能包括加密、解密、签名、验签以及获取机器唯一标识等。该 SDK 适用于需要进行软件授权管理的场景,提供了一套完整的工具类接口。

软件架构

该项目采用模块化设计,主要包含以下几个核心模块:

  • CryptoUtils: 提供基于 RSA 的加密、解密、签名和验签功能。
  • LicUtils: 提供许可证模型生成与验证逻辑。
  • SystemUtils: 提供获取机器信息(如 MAC 地址、机器 ID、CPU MD5)的功能。
  • Contants: 定义项目中使用的常量。

代码分为 public/srcsrc 两个目录,分别用于存放公共代码和核心实现。

安装教程

  1. 确保已安装 Node.js 和 npm。
  2. 使用 npm 安装 SDK:
    npm install tylic-npm-sdk

使用说明

以下是一些核心功能的使用示例:

生成 RSA 密钥对

const { CryptoUtils } = require('tylic-npm-sdk');
const keys = CryptoUtils.generateRsaKeyWithPKCS8();
console.log('Public Key:', keys.publicKey);
console.log('Private Key:', keys.privateKey);

使用公钥加密 & 私钥解密

const plainText = 'Hello, World!';
const encrypted = CryptoUtils.encryptByRSA(keys.publicKey, plainText);
const decrypted = CryptoUtils.decryptByRSA(keys.privateKey, encrypted);
console.log('Decrypted:', decrypted);

使用私钥签名 & 公钥验签

const signature = CryptoUtils.signBySHA256WithRSA(keys.privateKey, plainText);
const isValid = CryptoUtils.verifyBySHA256WithRSA(keys.publicKey, signature, plainText);
console.log('Signature valid:', isValid);

获取机器信息

const { SystemUtils } = require('tylic-npm-sdk');
const mac = SystemUtils.getMac();
const machineId = SystemUtils.getMachineId();
console.log('MAC Address:', mac);
console.log('Machine ID:', machineId);

生成与验证许可证

const { LicUtils } = require('tylic-npm-sdk');
const licModel = LicUtils.getLicModel('your-license-code');
console.log('License Model:', licModel);

const isValidLic = LicUtils.verify('your-encrypted-license');
console.log('License valid:', isValidLic);

许可证

本项目遵循开源许可协议,请参考项目中的 LICENSE 文件获取详细信息。