diff options
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); |