예제 #1
0
        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());
        }
예제 #2
0
 protected OpenPgpStringToKeySpecifier(OpenPgpStringToKeySpecifierId id, Stream inputStream) : this(id) {
     HashAlgorithm = OpenPgpHashAlgorithm.GetHashAlgorithmById(inputStream.ReadByte());
 }
예제 #3
0
 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());
 }