diff --git a/README.md b/README.md index e39e4f298..d12af8fc8 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,6 @@ Private keys can be encrypted using one of the following cipher methods: * hmac-sha2-256-96 * hmac-sha2-512 * hmac-sha2-512-96 -* hmac-ripemd160 -* hmac-ripemd160@openssh.com * hmac-md5-etm@openssh.com * hmac-md5-96-etm@openssh.com * hmac-sha1-etm@openssh.com diff --git a/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs b/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs index ca187833f..ac3d1915c 100644 --- a/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs +++ b/src/Renci.SshNet/Abstractions/CryptoAbstraction.cs @@ -66,24 +66,6 @@ public static System.Security.Cryptography.SHA512 CreateSHA512() return System.Security.Cryptography.SHA512.Create(); } -#if FEATURE_HASH_RIPEMD160_CREATE || FEATURE_HASH_RIPEMD160_MANAGED - public static System.Security.Cryptography.RIPEMD160 CreateRIPEMD160() - { -#if FEATURE_HASH_RIPEMD160_CREATE -#pragma warning disable CA5350 // Do not use weak cryptographic algorithms - return System.Security.Cryptography.RIPEMD160.Create(); -#pragma warning restore CA5350 // Do not use weak cryptographic algorithms -#else - return new System.Security.Cryptography.RIPEMD160Managed(); -#endif - } -#else - public static global::SshNet.Security.Cryptography.RIPEMD160 CreateRIPEMD160() - { - return new global::SshNet.Security.Cryptography.RIPEMD160(); - } -#endif // FEATURE_HASH_RIPEMD160 - public static System.Security.Cryptography.HMACMD5 CreateHMACMD5(byte[] key) { #pragma warning disable CA5351 // Do not use broken cryptographic algorithms @@ -141,19 +123,5 @@ public static HMACSHA512 CreateHMACSHA512(byte[] key, int hashSize) { return new HMACSHA512(key, hashSize); } - -#if FEATURE_HMAC_RIPEMD160 - public static System.Security.Cryptography.HMACRIPEMD160 CreateHMACRIPEMD160(byte[] key) - { -#pragma warning disable CA5350 // Do not use weak cryptographic algorithms - return new System.Security.Cryptography.HMACRIPEMD160(key); -#pragma warning restore CA5350 // Do not use weak cryptographic algorithms - } -#else - public static global::SshNet.Security.Cryptography.HMACRIPEMD160 CreateHMACRIPEMD160(byte[] key) - { - return new global::SshNet.Security.Cryptography.HMACRIPEMD160(key); - } -#endif // FEATURE_HMAC_RIPEMD160 } } diff --git a/src/Renci.SshNet/ConnectionInfo.cs b/src/Renci.SshNet/ConnectionInfo.cs index d57c08860..3fc6da1be 100644 --- a/src/Renci.SshNet/ConnectionInfo.cs +++ b/src/Renci.SshNet/ConnectionInfo.cs @@ -381,8 +381,6 @@ public ConnectionInfo(string host, int port, string username, ProxyTypes proxyTy { "hmac-sha2-512", new HashInfo(64*8, key => CryptoAbstraction.CreateHMACSHA512(key), isEncryptThenMAC: false) }, { "hmac-sha2-512-96", new HashInfo(64*8, key => CryptoAbstraction.CreateHMACSHA512(key, 96), isEncryptThenMAC: false) }, { "hmac-sha2-256-96", new HashInfo(32*8, key => CryptoAbstraction.CreateHMACSHA256(key, 96), isEncryptThenMAC: false) }, - { "hmac-ripemd160", new HashInfo(160, key => CryptoAbstraction.CreateHMACRIPEMD160(key), isEncryptThenMAC: false) }, - { "hmac-ripemd160@openssh.com", new HashInfo(160, key => CryptoAbstraction.CreateHMACRIPEMD160(key), isEncryptThenMAC: false) }, { "hmac-sha1", new HashInfo(20*8, key => CryptoAbstraction.CreateHMACSHA1(key), isEncryptThenMAC: false) }, { "hmac-sha1-96", new HashInfo(20*8, key => CryptoAbstraction.CreateHMACSHA1(key, 96), isEncryptThenMAC: false) }, { "hmac-md5", new HashInfo(16*8, key => CryptoAbstraction.CreateHMACMD5(key), isEncryptThenMAC: false) }, diff --git a/src/Renci.SshNet/Renci.SshNet.csproj b/src/Renci.SshNet/Renci.SshNet.csproj index f1ce038ba..48029e11a 100644 --- a/src/Renci.SshNet/Renci.SshNet.csproj +++ b/src/Renci.SshNet/Renci.SshNet.csproj @@ -29,13 +29,9 @@ - $(DefineConstants);FEATURE_BINARY_SERIALIZATION;FEATURE_HASH_RIPEMD160_CREATE;FEATURE_HMAC_RIPEMD160 + $(DefineConstants);FEATURE_BINARY_SERIALIZATION - - - -