public void AlteredKeyCheckValueIsNotValid()
        {
            byte[] key = CryptoRandom.NextBytesStatic(32);
            byte[] kcv = KeyCheckValueValidator.GenerateKeyCheckValue(key);
            if (key[0] > 120)
            {
                key[0]--;
            }
            else
            {
                key[0]++;
            }

            bool exceptionWasThrown = false;

            try
            {
                KeyCheckValueValidator.ValidateKeyCheckValue(key, kcv);
            }
            catch (KeyCheckValueValidationException)
            {
                exceptionWasThrown = true;
            }

            Assert.True(exceptionWasThrown, "Validation of KCV should have failed, but it didn't");
        }
        public void UnalteredKeyCheckValueIsValid()
        {
            byte[] key = CryptoRandom.NextBytesStatic(32);
            byte[] kcv = KeyCheckValueValidator.GenerateKeyCheckValue(key);

            bool exceptionWasThrown = false;

            try
            {
                KeyCheckValueValidator.ValidateKeyCheckValue(key, kcv);
            }
            catch (KeyCheckValueValidationException)
            {
                exceptionWasThrown = true;
            }

            Assert.False(exceptionWasThrown, "Validation of KCV has failed");
        }