init commit

This commit is contained in:
2025-10-09 09:57:24 +09:00
commit 4d551bd74f
6636 changed files with 1218703 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System;
namespace Org.BouncyCastle.Bcpg;
public class Crc24
{
private const int Crc24Init = 11994318;
private const int Crc24Poly = 25578747;
private int crc = 11994318;
public int Value => crc;
public void Update(int b)
{
crc ^= b << 16;
for (int i = 0; i < 8; i++)
{
crc <<= 1;
if ((crc & 0x1000000) != 0)
{
crc ^= 25578747;
}
}
}
[Obsolete("Use 'Value' property instead")]
public int GetValue()
{
return crc;
}
public void Reset()
{
crc = 11994318;
}
}