From cc924495915e669bd44e7fb3b03919b925eb8a3a Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Sun, 12 Dec 2021 16:56:57 +0300 Subject: [PATCH] experimental --- .../CompressedArray.cs | 0 .../ConsoleGUI}/Container.cs | 0 .../ConsoleGUI}/Control.cs | 0 .../ConsoleGUI}/IDrawable.cs | 0 .../ConsoleGUI}/Label.cs | 0 .../ConsoleGUI}/Window.cs | 0 .../ConsoleGUI}/WindowOld.cs | 0 MyDict.cs => Experimental/MyDict.cs | 0 .../Reactive}/ReactiveListener.cs | 0 .../Reactive}/ReactiveProvider.cs | 0 .../Reactive}/ReactiveSender.cs | 0 .../Reactive}/ReactiveStream.cs | 0 .../Reactive}/TimeSignedObject.cs | 0 .../SecureRandom.cs | 0 XXHash.cs | 34 +++++++++---------- 15 files changed, 16 insertions(+), 18 deletions(-) rename CompressedArray.cs => Experimental/CompressedArray.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/Container.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/Control.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/IDrawable.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/Label.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/Window.cs (100%) rename {ConsoleGUI => Experimental/ConsoleGUI}/WindowOld.cs (100%) rename MyDict.cs => Experimental/MyDict.cs (100%) rename {Reactive => Experimental/Reactive}/ReactiveListener.cs (100%) rename {Reactive => Experimental/Reactive}/ReactiveProvider.cs (100%) rename {Reactive => Experimental/Reactive}/ReactiveSender.cs (100%) rename {Reactive => Experimental/Reactive}/ReactiveStream.cs (100%) rename {Reactive => Experimental/Reactive}/TimeSignedObject.cs (100%) rename SecureRandom.cs => Experimental/SecureRandom.cs (100%) diff --git a/CompressedArray.cs b/Experimental/CompressedArray.cs similarity index 100% rename from CompressedArray.cs rename to Experimental/CompressedArray.cs diff --git a/ConsoleGUI/Container.cs b/Experimental/ConsoleGUI/Container.cs similarity index 100% rename from ConsoleGUI/Container.cs rename to Experimental/ConsoleGUI/Container.cs diff --git a/ConsoleGUI/Control.cs b/Experimental/ConsoleGUI/Control.cs similarity index 100% rename from ConsoleGUI/Control.cs rename to Experimental/ConsoleGUI/Control.cs diff --git a/ConsoleGUI/IDrawable.cs b/Experimental/ConsoleGUI/IDrawable.cs similarity index 100% rename from ConsoleGUI/IDrawable.cs rename to Experimental/ConsoleGUI/IDrawable.cs diff --git a/ConsoleGUI/Label.cs b/Experimental/ConsoleGUI/Label.cs similarity index 100% rename from ConsoleGUI/Label.cs rename to Experimental/ConsoleGUI/Label.cs diff --git a/ConsoleGUI/Window.cs b/Experimental/ConsoleGUI/Window.cs similarity index 100% rename from ConsoleGUI/Window.cs rename to Experimental/ConsoleGUI/Window.cs diff --git a/ConsoleGUI/WindowOld.cs b/Experimental/ConsoleGUI/WindowOld.cs similarity index 100% rename from ConsoleGUI/WindowOld.cs rename to Experimental/ConsoleGUI/WindowOld.cs diff --git a/MyDict.cs b/Experimental/MyDict.cs similarity index 100% rename from MyDict.cs rename to Experimental/MyDict.cs diff --git a/Reactive/ReactiveListener.cs b/Experimental/Reactive/ReactiveListener.cs similarity index 100% rename from Reactive/ReactiveListener.cs rename to Experimental/Reactive/ReactiveListener.cs diff --git a/Reactive/ReactiveProvider.cs b/Experimental/Reactive/ReactiveProvider.cs similarity index 100% rename from Reactive/ReactiveProvider.cs rename to Experimental/Reactive/ReactiveProvider.cs diff --git a/Reactive/ReactiveSender.cs b/Experimental/Reactive/ReactiveSender.cs similarity index 100% rename from Reactive/ReactiveSender.cs rename to Experimental/Reactive/ReactiveSender.cs diff --git a/Reactive/ReactiveStream.cs b/Experimental/Reactive/ReactiveStream.cs similarity index 100% rename from Reactive/ReactiveStream.cs rename to Experimental/Reactive/ReactiveStream.cs diff --git a/Reactive/TimeSignedObject.cs b/Experimental/Reactive/TimeSignedObject.cs similarity index 100% rename from Reactive/TimeSignedObject.cs rename to Experimental/Reactive/TimeSignedObject.cs diff --git a/SecureRandom.cs b/Experimental/SecureRandom.cs similarity index 100% rename from SecureRandom.cs rename to Experimental/SecureRandom.cs diff --git a/XXHash.cs b/XXHash.cs index 34efb95..4f29dab 100644 --- a/XXHash.cs +++ b/XXHash.cs @@ -2,10 +2,8 @@ using System.Security.Cryptography; namespace DTLib { - // // честно взятый с гитхаба алгоритм хеширования // выдаёт хеш в виде массива четырёх байтов - // sealed class XXHash32 : HashAlgorithm { private const uint PRIME32_1 = 2654435761U; @@ -58,23 +56,23 @@ namespace DTLib } } - // Creates an instance of class by default seed(0). - // + /// Creates an instance of class by default seed(0). + /// public static new XXHash32 Create() => new(); - // Initializes a new instance of the class by default seed(0). + /// Initializes a new instance of the class by default seed(0). public XXHash32() => Initialize(0); - // Initializes a new instance of the class, and sets the to the specified value. - // Represent the seed to be used for xxHash32 computing. + /// Initializes a new instance of the class, and sets the to the specified value. + /// Represent the seed to be used for xxHash32 computing. public XXHash32(uint seed) => Initialize(seed); - // Gets the value of the computed hash code. - // Hash computation has not yet completed. + /// Gets the value of the computed hash code. + /// Hash computation has not yet completed. public uint HashUInt32 => State == 0 ? _Hash32 : throw new InvalidOperationException("Hash computation has not yet completed."); - // Gets or sets the value of seed used by xxHash32 algorithm. - // Hash computation has not yet completed. + /// Gets or sets the value of seed used by xxHash32 algorithm. + /// Hash computation has not yet completed. public uint Seed { get => _Seed32; @@ -90,7 +88,7 @@ namespace DTLib } } - // Initializes this instance for new hash computing. + /// Initializes this instance for new hash computing. public override void Initialize() { _ACC32_1 = _Seed32 + PRIME32_1 + PRIME32_2; @@ -99,10 +97,10 @@ namespace DTLib _ACC32_4 = _Seed32 - PRIME32_1; } - // Routes data written to the object into the hash algorithm for computing the hash. - // The input to compute the hash code for. - // The offset into the byte array from which to begin using data. - // The number of bytes in the byte array to use as data. + /// Routes data written to the object into the hash algorithm for computing the hash. + /// The input to compute the hash code for. + /// The offset into the byte array from which to begin using data. + /// The number of bytes in the byte array to use as data. protected override void HashCore(byte[] array, int ibStart, int cbSize) { if (State != 1) @@ -132,8 +130,8 @@ namespace DTLib } } - // Finalizes the hash computation after the last data is processed by the cryptographic stream object. - // The computed hash code. + /// Finalizes the hash computation after the last data is processed by the cryptographic stream object. + /// The computed hash code. protected override byte[] HashFinal() { _Hash32 = _TotalLength >= 16