feat(hash): 添加 BLAKE2b 校验和算法支持

- 在 `hash` 模块中新增 `blake2b` 子包,实现 BLAKE2b 系列散列算法
- 支持多种输出长度:224、256、384 和 512 位
- 提供字节及十六进制字符串两种格式的散列计算函数
- 支持对字节数组和文件进行散列计算
- 更新 go.mod 使用 Go 1.24.0 并引入 golang.org/x/crypto 和 golang.org/x/sys 依赖
- 更新 README.md 标记 BLAKE2b 功能为已完成
This commit is contained in:
徐涛
2025-10-07 22:29:05 +08:00
parent 53330ceab9
commit 357b19d9ad
4 changed files with 126 additions and 3 deletions

4
go.mod
View File

@@ -1,6 +1,6 @@
module archgrid.xyz/ag/toolsbox
go 1.20
go 1.24.0
require go.uber.org/zap v1.24.0
@@ -8,6 +8,7 @@ require (
github.com/azr/gift v1.1.2 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
golang.org/x/image v0.0.0-20220722155232-062f8c9fd539 // indirect
golang.org/x/sys v0.36.0 // indirect
)
require (
@@ -17,4 +18,5 @@ require (
github.com/sigurn/crc8 v0.0.0-20220107193325-2243fe600f9f
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.42.0
)