Exemplo n.º 1
0
        public static void CreateKeyVector_KeySize_OutOfRange(int keySize)
        {
            // Arrange

            // Act
            Assert.Throws <ArgumentOutOfRangeException>(()
                                                        => RC2Helper.CreateKeyVector("test", keySize));

            // Assert
        }
Exemplo n.º 2
0
        public static void CreateKeyVector(string key, string iv, int keySize, string passphrase)
        {
            // Arrange

            // Act
            var result = RC2Helper.CreateKeyVector(passphrase, keySize);

            // Assert
            Assert.Equal(key, Convert.ToBase64String(result.First));
            Assert.Equal(iv, Convert.ToBase64String(result.Second));
        }
Exemplo n.º 3
0
 public RC2KeyVectorProvider(string passphrase, int keySize)
     : base(RC2Helper.CreateKeyVector(passphrase, keySize))
 {
 }