Пример #1
0
        private Dictionary <string, List <DomainLicense> > DecryptAll(ICollection <byte[]> encrypted)
        {
            var licenses = new Dictionary <string, List <DomainLicense> >(StringComparer.OrdinalIgnoreCase);

            foreach (byte[] data in encrypted)
            {
                var    d      = new DomainLicense(data, password);
                string domain = d.Domain;
                List <DomainLicense> forDomain;
                if (!licenses.TryGetValue(domain, out forDomain))
                {
                    forDomain        = new List <DomainLicense>();
                    licenses[domain] = forDomain;
                }
                forDomain.Add(d);
            }
            return(licenses);
        }
Пример #2
0
        private Dictionary<string, List<DomainLicense>> DecryptAll(ICollection<byte[]> encrypted)
        {
            var licenses = new Dictionary<string, List<DomainLicense>>(StringComparer.OrdinalIgnoreCase);

            foreach (byte[] data in encrypted) {
                var d = new DomainLicense(data, password);
                string domain = d.Domain;
                List<DomainLicense> forDomain;
                if (!licenses.TryGetValue(domain, out forDomain)) {
                    forDomain = new List<DomainLicense>();
                    licenses[domain] = forDomain;
                }
                forDomain.Add(d);
            }
            return licenses;
        }