This commit is contained in:
houjunxiang
2025-10-09 18:19:55 +08:00
parent f2ffc65094
commit 386f1e7466
1553 changed files with 284685 additions and 32820 deletions

View File

@@ -0,0 +1,3 @@
export * as SM2 from './lib/sm2/'
export * as SM3 from './lib/sm3'
export * as SM4 from './lib/sm4'

View File

@@ -0,0 +1,3 @@
export const C1C2C3 = 0
export const C1C3C2 = 1
export const PC = '04' // 未压缩

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
// 32 位整数无符号循环左移
export const leftShift = (a, n) => {
n = n % 32
return (a << n) | (a >>> (32 - n))
}
// 补全 16 进制字符串
export const leftPad = (str, num) => {
const padding = num - str.length
return (padding > 0 ? '0'.repeat(padding) : '') + str
}