Class Crc32
Namespace: Tool.Utils
Assembly: Tool.Net.dll
提供 CRC32 算法的实现
public class Crc32 : HashAlgorithm, ICryptoTransform, IDisposableInheritance
object ← HashAlgorithm ← Crc32
Implements
Inherited Members
HashAlgorithm.HashSizeValue, HashAlgorithm.HashValue, HashAlgorithm.State, HashAlgorithm.Clear(), HashAlgorithm.ComputeHash(byte[]), HashAlgorithm.ComputeHash(byte[], int, int), HashAlgorithm.ComputeHash(Stream), HashAlgorithm.ComputeHashAsync(Stream, CancellationToken), HashAlgorithm.Create(), HashAlgorithm.Create(string), HashAlgorithm.Dispose(), HashAlgorithm.Dispose(bool), HashAlgorithm.HashCore(byte[], int, int), HashAlgorithm.HashCore(ReadOnlySpan<byte>), HashAlgorithm.HashFinal(), HashAlgorithm.Initialize(), HashAlgorithm.TransformBlock(byte[], int, int, byte[]?, int), HashAlgorithm.TransformFinalBlock(byte[], int, int), HashAlgorithm.TryComputeHash(ReadOnlySpan<byte>, Span<byte>, out int), HashAlgorithm.TryHashFinal(Span<byte>, out int), HashAlgorithm.CanReuseTransform, HashAlgorithm.CanTransformMultipleBlocks, HashAlgorithm.Hash, HashAlgorithm.HashSize, HashAlgorithm.InputBlockSize, HashAlgorithm.OutputBlockSize, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)
Remarks
代码由逆血提供支持
Constructors
Crc32()
public Crc32()Crc32(uint, uint)
public Crc32(uint polynomial, uint seed)Parameters
polynomial uint
seed uint
Fields
DefaultPolynomial
public const uint DefaultPolynomial = 3988292384Field Value
DefaultSeed
public const uint DefaultSeed = 4294967295Field Value
Methods
Compute(byte[])
public static uint Compute(byte[] buffer)Parameters
buffer byte[]
Returns
Compute(uint, byte[])
public static uint Compute(uint seed, byte[] buffer)Parameters
seed uint
buffer byte[]
Returns
Compute(uint, uint, byte[])
public static uint Compute(uint polynomial, uint seed, byte[] buffer)Parameters
polynomial uint
seed uint
buffer byte[]
Returns
HashCore(byte[], int, int)
protected override void HashCore(byte[] buffer, int start, int length)Parameters
buffer byte[]
start int
length int
HashFinal()
protected override byte[] HashFinal()Returns
byte[]
Initialize()
初始化参数
public override void Initialize()