fix: remove chinese symbol

This commit is contained in:
2024-01-09 17:28:22 +08:00
parent 96577f67ca
commit d2386f84b3

View File

@@ -185,7 +185,7 @@ void ChaCha20_block(uint32_t state[16], uint32_t output[16]) {
int i;
memcpy(output, state, sizeof(uint32_t) * 16);
// 20轮操作每轮包括4个quarterrounds所以共80个quarterrounds
// 20轮操作,每轮包括4个quarterrounds,所以共80个quarterrounds
for (i = 0; i < 10; ++i) {
// 双轮
QUARTERROUND(output, 0, 4, 8, 12)
@@ -266,7 +266,7 @@ typedef struct {
uint8_t Key[KEYLEN]; // 用于ChaCha20的密钥
uint8_t V[COUNTERLEN]; // 用于ChaCha20的计数器
int reseed_counter; // 重播种计数值
int reseed_time; // 上次重播种时间值(秒)
int reseed_time; // 上次重播种时间值(秒)
bool used; // 表示此状态是否已经被使用
} DRBG_State;
@@ -318,7 +318,7 @@ void initialize_states() {
}
}
// 查找并返回一个空闲的状态句柄如果没有可用的空间则返回INVALID_HANDLE
// 查找并返回一个空闲的状态句柄.如果没有可用的空间,则返回INVALID_HANDLE
int Find_state_space() {
for (int i = 0; i < MAX_STATES; i++) {
if (!drbg_states[i].used) {
@@ -333,7 +333,7 @@ void increment_nonce(uint8_t *nonce) {
for (int i = 0; i < NONCELEN; i++) {
nonce[i]++;
if (nonce[i] != 0) { // 检查是否有溢出
break; // 如果没有溢出则不需要进位
break; // 如果没有溢出,则不需要进位
}
}
}