コード例 #1
0
        public void TranslateEncryptedPinBlock(string pinBlock, string accountOrPadding,
                                               PinBlockFormat sourceFormat, PinBlockFormat targetFormat,
                                               string sourceClearKey, string targetClearKey, string expected)
        {
            var pb  = new PinBlock(pinBlock, accountOrPadding, sourceFormat, new HexKey(sourceClearKey));
            var key = new HexKey(targetClearKey);

            Assert.AreEqual(expected, pb.Translate(key, targetFormat));
        }
コード例 #2
0
        public void TranslateClearPinBlock(string pin, string accountOrPadding, PinBlockFormat sourceFormat, PinBlockFormat targetFormat, string expected)
        {
            var pb = new PinBlock(pin, accountOrPadding, sourceFormat);

            Assert.AreEqual(expected, pb.Translate(targetFormat));
        }