{"id":28539376,"url":"https://github.com/yourtion/node-sm4-addon","last_synced_at":"2025-10-06T17:17:54.352Z","repository":{"id":56953840,"uuid":"304639916","full_name":"yourtion/node-sm4-addon","owner":"yourtion","description":"基于 N-API 构建的 Node.js SM4 C++ 扩展，支持 Linux、Mac、Windows，性能卓越","archived":false,"fork":false,"pushed_at":"2020-12-27T02:38:17.000Z","size":268,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-14T16:53:08.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yourtion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-16T13:46:26.000Z","updated_at":"2025-01-17T05:57:01.000Z","dependencies_parsed_at":"2022-08-21T08:50:07.333Z","dependency_job_id":null,"html_url":"https://github.com/yourtion/node-sm4-addon","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/yourtion/node-sm4-addon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-sm4-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-sm4-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-sm4-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-sm4-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yourtion","download_url":"https://codeload.github.com/yourtion/node-sm4-addon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-sm4-addon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278646829,"owners_count":26021523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T18:31:41.983Z","updated_at":"2025-10-06T17:17:54.346Z","avatar_url":"https://github.com/yourtion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-sm4-addon\n\n基于 N-API 构建的 Node.js SM4 C++ 扩展，支持 Linux、Mac、Windows，性能卓越。\n\n支持 Node.js 8.x - 15.x，测试情况看 Github Actions 结果：![Node.js CI](https://github.com/yourtion/node-sm4-addon/workflows/Node.js%20CI/badge.svg?branch=main)\n\n## Usage\n\n```shell\n$ npm install -S @techs/sm4-addon\n```\n\n```javascript\nconst sm4 = require(\"@techs/sm4-addon\");\nconst assert = require(\"assert\");\n\nconst key = \"1512691780427141\";\nconst data = \"%7B%22tranCode%22%3A%22tranCode_0%22%2C%22body%22%3A%7B%22time%22%3A%22374732%22%7D%7D\";\nconst ret = \"34b417a4f99b1343256089e64638f6a7061aa79ce88ad0efc12cf4886560fc7bc93f253e28538aa8b1bd236cdf99dcef5b2e2e5567aa9b06e035900c0d00ada59a68190b15d4a727ac47fb2420e476e7846be51a88e024324ba29ebad50502d9\";\n// 加密\nconst a = sm4.encrypt(key, data);\n\nconsole.log(a);\nassert(a === ret);\n// 解密\nconst b = sm4.decrypt(key, a);\nassert(b === data);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2Fnode-sm4-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyourtion%2Fnode-sm4-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2Fnode-sm4-addon/lists"}