예제 #1
0
        public void GetRandomBytes_256KeySize_KeyGenerated()
        {
            const ushort expectedKeySize = 256;

            byte[] key = AesCryptoProvider.GetRandomBytes(expectedKeySize);
            key.Length.Should().Be((int)expectedKeySize);
        }
예제 #2
0
 public static void ClassInitialize(TestContext context)
 {
     _key     = AesCryptoProvider.GetRandomBytes(16);
     _hashKey = "Secret".ToBytes(Encoding.UTF8);
 }