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); } }
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); } }