diff options
author | Kenny Root <kenny@the-b.org> | 2013-10-05 22:28:37 -0700 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2013-10-06 10:11:56 -0700 |
commit | e15169b4d1148941ecddc65ea138242a7edc592b (patch) | |
tree | 48c79b3637f98b493b5668b1ae5fb70a2402fcb8 /lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java | |
parent | ab43a3e5a86e9028d38436beb992b24757050a66 (diff) | |
download | sshlib-e15169b4d1148941ecddc65ea138242a7edc592b.tar.gz sshlib-e15169b4d1148941ecddc65ea138242a7edc592b.tar.bz2 sshlib-e15169b4d1148941ecddc65ea138242a7edc592b.zip |
Add diffie-hellman-group-exchange-sha256 support
Support exchanging groups using SHA-256 as specified in RFC 4419
For more information, see https://tools.ietf.org/html/rfc4419
Change-Id: Iee5d29e7113a05cad4714a61321bf86b016624b8
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java')
-rw-r--r-- | lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java b/lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java index 499422f..1dbd6c7 100644 --- a/lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java +++ b/lib/src/main/java/com/trilead/ssh2/crypto/KeyMaterial.java @@ -3,8 +3,6 @@ package com.trilead.ssh2.crypto; import java.math.BigInteger; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import com.trilead.ssh2.crypto.digest.HashForSSH2Types; @@ -74,12 +72,7 @@ public class KeyMaterial { KeyMaterial km = new KeyMaterial(); - HashForSSH2Types sh; - try { - sh = new HashForSSH2Types(MessageDigest.getInstance(hashAlgo)); - } catch (NoSuchAlgorithmException e) { - throw new IllegalArgumentException(e); - } + HashForSSH2Types sh = new HashForSSH2Types(hashAlgo); km.initial_iv_client_to_server = calculateKey(sh, K, H, (byte) 'A', SessionID, blockSizeCS); |