public override void Execute(object parameter)
        {
            var vm = (TextHashingViewModel)parameter;

            var hasher = new Md5HashGenerator();

            vm.Checksum = hasher.Hash(vm.Message);
        }
예제 #2
0
        public override void Execute(object parameter)
        {
            var vm = (FileHashingViewModel)parameter;

            var hasher = new Md5HashGenerator();

            vm.GeneratedChecksum = hasher.Hash(new BinaryReader(File.OpenRead(vm.FilePath)));
        }
예제 #3
0
        public void Hash_Positive_ReturnsHash(string input, string expected)
        {
            var actual = _generator.Hash(input);

            Assert.Equal(expected, actual);
        }