1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Random serialization

This commit is contained in:
Brian Fiete 2024-02-27 10:59:48 -05:00
parent df807dc275
commit df957137ea

View file

@ -284,6 +284,22 @@ namespace System
buffer[i] = (uint8)(InternalSample() % ((int32)UInt8.MaxValue + 1));
}
}
public void Serialize(String str)
{
inext.ToString(str, "X8", null);
inextp.ToString(str, "X8", null);
for (int i < 56)
SeedArray[i].ToString(str, "X8", null);
}
public void Deserialize(String str)
{
inext = int32.Parse(str.Substring(0*8, 8), .Hex);
inextp = int32.Parse(str.Substring(1*8, 8), .Hex);
for (int i < 56)
SeedArray[i] = int32.Parse(str.Substring((i+2)*8, 8), .Hex);
}
}
static