示例#1
0
        private void CreateHMAC()
        {
            AlgorithmTypeViewModel AlgorithmTypeViewModel = new AlgorithmTypeViewModel()
            {
                TypeName = "HMAC функции"
            };

            foreach (var item in HMACFactory.Hmacs.Keys)
            {
                if (item.ToLower().Contains(Search.ToLower()))
                {
                    AlgorithmTypeViewModel.Algoriths.Add(new HMACAlgorithmViewModel(item));
                }
            }

            if (AlgorithmTypeViewModel.Algoriths.Count != 0)
            {
                AlgorithmTypeViewModels.Add(AlgorithmTypeViewModel);
            }
        }
示例#2
0
        private void CreateDigest()
        {
            AlgorithmTypeViewModel AlgorithmTypeViewModel = new AlgorithmTypeViewModel()
            {
                TypeName = "Хэш функции"
            };

            foreach (var item in DigestFactory.Digests.Keys)
            {
                if (item.ToLower().Contains(Search.ToLower()))
                {
                    AlgorithmTypeViewModel.Algoriths.Add(new DigestAlgorithmViewModel(item));
                }
            }

            if (AlgorithmTypeViewModel.Algoriths.Count != 0)
            {
                AlgorithmTypeViewModels.Add(AlgorithmTypeViewModel);
            }
        }