![]() |
SystemEX
Lacking
Additional generic collection types missing in .net
|
Defines a contract for objects that can be converted into a raw byte representation suitable for hashing, serialization, or low‑level processing. More...
Public Member Functions | |
| FixedVector< byte > | ToBytes () |
| Converts this instance into a deterministic byte array. The returned data is used as input for hashing algorithms. | |
Defines a contract for objects that can be converted into a raw byte representation suitable for hashing, serialization, or low‑level processing.
The interface is intentionally minimal: any type implementing IHashable<T> must provide a deterministic and stable ToBytes method. The returned byte sequence is used by SystemEx hashing algorithms and must remain consistent across platforms and runtime sessions.
Example:
A type implementing both IHashable<T> and a hash attribute:
| T | The type that provides its own byte representation. |
| FixedVector< byte > SystemEx.Hash.IHashable< T >.ToBytes | ( | ) |
Converts this instance into a deterministic byte array. The returned data is used as input for hashing algorithms.
Implemented in Examples.SensorData, SystemEx.Numeric.Half16, SystemEx.Numeric.Quatd, SystemEx.Numeric.Quatf, SystemEx.Numeric.Vec2d, SystemEx.Numeric.Vec2f, SystemEx.Numeric.Vec2i, SystemEx.Numeric.Vec3d, SystemEx.Numeric.Vec3f, SystemEx.Numeric.Vec3i, SystemEx.Numeric.Vec4d, SystemEx.Numeric.Vec4f, and SystemEx.Numeric.Vec4i.