public void Setup()
        {
            Enumerable.Repeat <byte>(0xFF, 1000).ToArray().CopyTo(Payload1, 0);
            Enumerable.Repeat <byte>(0xAA, 1000).ToArray().CopyTo(Payload1, 1000);
            Enumerable.Repeat <byte>(0x1A, 1000).ToArray().CopyTo(Payload1, 2000);
            Enumerable.Repeat <byte>(0xAF, 1000).ToArray().CopyTo(Payload1, 3000);
            Enumerable.Repeat <byte>(0x01, 1000).ToArray().CopyTo(Payload1, 4000);

            RecyclableManager.ConfigureNewStaticManagerWithDefaults();
            RecyclableProvider = new RecyclableGzipProvider();
            CompressedPayload1 = RecyclableProvider.Compress(Payload1).ToArray();
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            Enumerable.Repeat <byte>(0xFF, 1000).ToArray().CopyTo(_data, 0);
            Enumerable.Repeat <byte>(0xAA, 1000).ToArray().CopyTo(_data, 1000);
            Enumerable.Repeat <byte>(0x1A, 1000).ToArray().CopyTo(_data, 2000);
            Enumerable.Repeat <byte>(0xAF, 1000).ToArray().CopyTo(_data, 3000);
            Enumerable.Repeat <byte>(0x01, 1000).ToArray().CopyTo(_data, 4000);

            MyClass.ByteData = _data;

            var hashingProvider = new Argon2ID_HashingProvider();
            var hashKey         = hashingProvider.GetHashKey(Passphrase, Salt, 32);

            RecyclableManager.ConfigureNewStaticManagerWithDefaults();

            _middleware = new RecyclableTransformer(
                new Utf8JsonProvider(),
                new RecyclableGzipProvider(),
                new RecyclableAesGcmEncryptionProvider(hashKey));
        }