Mod Details

SuntionCore 1.2.0

Created by Suntion

1.3K Downloads

SPT 4.0.13 Compatible

Some commonly used methods extracted and optimized from the mods I've created, suitable for SPT server mods.

Latest Version 1.2.0
SPT 4.0.13

Updated Mar 15, 5:45 PM

13.39 KB

Version Notes
English

New Features

  • Hash Utility Class (HashUtil)

    • Added a universal hash calculation service supporting multiple algorithms: SHA1, SHA256, MD5, SHA384, SHA512 (default is SHA256)
    • Provides simple static methods: Hash(string text, HashAlgo hashAlgo) and Hash(byte[] data, HashAlgo hashAlgo)
    • Security Notice: Clearly distinguishes between recommended algorithms (SHA-2 series) and legacy algorithms (SHA1, MD5) with their applicable scenarios
  • Documentation Improvements

    • Updated Chinese and English README and API documentation, added HashUtil usage instructions

Optimizations and Adjustments

  • Centralized Module Constants Management
    • Centralized module name and logger instance management for improved code maintainability
  • Logging System Optimization
    • Simplified log access method, unified usage of SuntionCoreMod.Logger

Version Information

  • Module version updated to 1.2.0
  • Compatibility: No breaking changes, existing features remain unaffected

Developer Notes

  • When using the hash utility, please note: SHA1 and MD5 are only suitable for non-security-sensitive scenarios (such as file verification), it is recommended to use SHA256 and above algorithms
中文

新增功能

  • 哈希工具类 (HashUtil)

    • 新增通用哈希计算服务,支持 SHA1SHA256MD5SHA384SHA512 多种算法(默认 SHA256
    • 提供简单易用的静态方法:Hash(string text, HashAlgo hashAlgo)Hash(byte[] data, HashAlgo hashAlgo)
    • 安全提示:明确区分推荐算法(SHA-2 系列)与遗留算法(SHA1、MD5)的适用场景
  • 文档完善

    • 更新中英文 README 和 API 文档,新增 HashUtil 使用说明

优化与调整

  • 模组常量统一管理
    • 将模组名称和日志实例集中管理,提升代码可维护性
  • 日志系统优化
    • 简化日志获取方式,统一使用 SuntionCoreMod.Logger

版本信息

  • 模组版本号更新至 1.2.0
  • 兼容性:无破坏性变更,现有功能不受影响

开发者注意事项

  • 使用哈希工具时请注意:SHA1MD5 仅适用于非安全敏感场景(如文件校验),推荐使用 SHA256 及以上算法
This download is externally hosted.
Always scan for viruses.

Details