From efb71c4850e2e0296ebb8950490865fbff3a4231 Mon Sep 17 00:00:00 2001 From: xRain Date: Tue, 25 Aug 2026 12:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84:=E6=BA=90=E7=A0=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=94=B9=E4=B8=BA=E8=9B=87=E5=BD=A2=E5=91=BD=E5=90=8D?= =?UTF-8?q?,=E6=96=B0=E5=A2=9E=20.gitignore=20=E5=BF=BD=E7=95=A5=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E4=BA=A7=E7=89=A9,=E7=89=88=E6=9C=AC=E5=8D=87?= =?UTF-8?q?=E8=87=B3=201.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ README.md | 4 ++-- cjpm.toml | 2 +- src/{Base32.cj => base32.cj} | 0 src/{HmacSha1.cj => hmac_sha1.cj} | 0 src/{Hotp.cj => hotp.cj} | 0 src/{OtpUri.cj => otp_uri.cj} | 0 src/tests/{Otp_test.cj => otp_test.cj} | 0 src/{Totp.cj => totp.cj} | 0 9 files changed, 5 insertions(+), 3 deletions(-) rename src/{Base32.cj => base32.cj} (100%) rename src/{HmacSha1.cj => hmac_sha1.cj} (100%) rename src/{Hotp.cj => hotp.cj} (100%) rename src/{OtpUri.cj => otp_uri.cj} (100%) rename src/tests/{Otp_test.cj => otp_test.cj} (100%) rename src/{Totp.cj => totp.cj} (100%) diff --git a/.gitignore b/.gitignore index 44bd8e9..510fa75 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ target/ # 临时测试产物 probe.cjo +# 测试宏展开产物(cjpm test 生成) +*.cj.macrocall diff --git a/README.md b/README.md index 415175b..c90db34 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 仓颉(Cangjie)一次性密码(OTP)库,实现 **HOTP**(RFC 4226)与 **TOTP**(RFC 6238),提供 Base32 密钥编解码(RFC 4648)与 `otpauth://` URI 生成,可直接与 Google Authenticator / Microsoft Authenticator 等常见 OTP App 互通。 -组织:`simcu` | 包名:`otp` | 版本:`1.0.0` +组织:`simcu` | 包名:`otp` | 版本:`1.0.1` ## 特性 @@ -20,7 +20,7 @@ ```toml [dependencies] "simcu::otp" = { path = "../../cangjie/otp-cj" } -# 或发布到中央仓后:"simcu::otp" = "1.0.0" +# 或发布到中央仓后:"simcu::otp" = "1.0.1" ``` 代码中引用: diff --git a/cjpm.toml b/cjpm.toml index 839b9d2..598a10d 100644 --- a/cjpm.toml +++ b/cjpm.toml @@ -3,7 +3,7 @@ name = "otp" organization = "simcu" description = "SimApi OTP(一次性密码)库:HOTP/TOTP 实现(RFC 4226/6238),Base32 密钥与 otpauth:// URI 生成" - version = "1.0.0" + version = "1.0.1" target-dir = "" output-type = "static" diff --git a/src/Base32.cj b/src/base32.cj similarity index 100% rename from src/Base32.cj rename to src/base32.cj diff --git a/src/HmacSha1.cj b/src/hmac_sha1.cj similarity index 100% rename from src/HmacSha1.cj rename to src/hmac_sha1.cj diff --git a/src/Hotp.cj b/src/hotp.cj similarity index 100% rename from src/Hotp.cj rename to src/hotp.cj diff --git a/src/OtpUri.cj b/src/otp_uri.cj similarity index 100% rename from src/OtpUri.cj rename to src/otp_uri.cj diff --git a/src/tests/Otp_test.cj b/src/tests/otp_test.cj similarity index 100% rename from src/tests/Otp_test.cj rename to src/tests/otp_test.cj diff --git a/src/Totp.cj b/src/totp.cj similarity index 100% rename from src/Totp.cj rename to src/totp.cj