static OpenPgpHashAlgorithm() { Action <int, Func <HashAlgorithm> > add = (id, factory) => _IdToAlgorithm[id] = new OpenPgpHashAlgorithm(id, factory); // Section 9.4 add(2, () => new SHA1CryptoServiceProvider()); add(8, () => new SHA256CryptoServiceProvider()); add(9, () => new SHA384CryptoServiceProvider()); add(10, () => new SHA512CryptoServiceProvider()); }
protected OpenPgpStringToKeySpecifier(OpenPgpStringToKeySpecifierId id, Stream inputStream) : this(id) { HashAlgorithm = OpenPgpHashAlgorithm.GetHashAlgorithmById(inputStream.ReadByte()); }
static OpenPgpHashAlgorithm() { Action<int, Func<HashAlgorithm>> add = (id, factory) => _IdToAlgorithm[id] = new OpenPgpHashAlgorithm(id, factory); // Section 9.4 add(2, () => new SHA1CryptoServiceProvider()); add(8, () => new SHA256CryptoServiceProvider()); add(9, () => new SHA384CryptoServiceProvider()); add(10, () => new SHA512CryptoServiceProvider()); }