Releases: lbbniu/isaac
Releases · lbbniu/isaac
v1.0.1
ISAAC CSPRNG v1.0.1
中文说明
这是 ISAAC CSPRNG 的第二个版本,主要增加了并发安全支持并改进了代码注释。
主要更新
- 为所有实现添加了并发安全支持
- 泛型版本 (ISAAC[T])
- 32位版本 (ISAAC32)
- 64位版本 (ISAAC64)
- 改进了代码注释
- 将中文注释改为英文
- 统一了注释风格
- 增加了更多实现细节说明
使用示例
// 创建一个新的 ISAAC 实例
rng := isaac.New[uint32]()
// 在多个 goroutine 中安全使用
go func() {
r1 := rng.Rand()
// ...
}()
go func() {
r2 := rng.Rand()
// ...
}()English
This is the second release of ISAAC CSPRNG, adding concurrency safety and improving code comments.
Major Updates
- Added concurrency safety to all implementations
- Generic version (ISAAC[T])
- 32-bit version (ISAAC32)
- 64-bit version (ISAAC64)
- Improved code comments
- Converted Chinese comments to English
- Unified comment style
- Added more implementation details
Usage Example
// Create a new ISAAC instance
rng := isaac.New[uint32]()
// Safely use in multiple goroutines
go func() {
r1 := rng.Rand()
// ...
}()
go func() {
r2 := rng.Rand()
// ...
}()Full Changelog: v1.0.0...v1.0.1
v1.0.0
ISAAC CSPRNG v1.0.0
中文说明
这是 ISAAC CSPRNG 的第一个稳定版本,提供了完整的 ISAAC 加密安全伪随机数生成器实现。
主要特性
- 支持 32 位和 64 位两种实现
- 使用 Go 泛型实现,代码复用性高
- 完全兼容原始 C 版本的 ISAAC 算法
- 提供完整的测试用例
- 支持自定义种子初始化
使用示例
// 创建 32 位 ISAAC 实例
isaac32 := isaac.New[uint32]()
// 生成随机数
r32 := isaac32.Rand()
// 创建 64 位 ISAAC 实例
isaac64 := isaac.New[uint64]()
// 生成随机数
r64 := isaac64.Rand()性能
- 32 位实现:约 200MB/s
- 64 位实现:约 400MB/s
文档
- 详细的中英文文档
- 完整的 API 参考
- 使用示例和最佳实践
许可证
MIT License
English
This is the first stable release of ISAAC CSPRNG, providing a complete implementation of the ISAAC cryptographically secure pseudorandom number generator.
Main Features
- Support for both 32-bit and 64-bit implementations
- Implemented using Go generics for high code reusability
- Fully compatible with the original C version of ISAAC algorithm
- Comprehensive test cases
- Support for custom seed initialization
Usage Example
// Create a 32-bit ISAAC instance
isaac32 := isaac.New[uint32]()
// Generate random number
r32 := isaac32.Rand()
// Create a 64-bit ISAAC instance
isaac64 := isaac.New[uint64]()
// Generate random number
r64 := isaac64.Rand()Performance
- 32-bit implementation: ~200MB/s
- 64-bit implementation: ~400MB/s
Documentation
- Detailed documentation in both Chinese and English
- Complete API reference
- Usage examples and best practices
License
MIT License