diff app/src/main/java/ch/ethz/ssh2/crypto/digest/SHA512.java @ 510:7953570e5210

update to ganymed-ssh2 tag 263 and fix hmac-sha2-512
author Carl Byington <carl@five-ten-sg.com>
date Wed, 01 Feb 2023 17:55:29 -0700
parents d29cce60f393
children
line wrap: on
line diff
--- a/app/src/main/java/ch/ethz/ssh2/crypto/digest/SHA512.java	Sun Jan 29 10:25:21 2023 -0700
+++ b/app/src/main/java/ch/ethz/ssh2/crypto/digest/SHA512.java	Wed Feb 01 17:55:29 2023 -0700
@@ -33,7 +33,7 @@
     }
 
     public final void update(byte b[]) {
-        md.update(b);
+        this.update(b, 0, b.length);
     }
 
     public final void update(byte b[], int off, int len) {
@@ -44,11 +44,11 @@
         md.update(b);
     }
 
-    public final void digest(byte[] out) {
-        md.digest(out);
+    public final void digest(byte[] out) throws DigestException {
+        this.digest(out, 0);
     }
 
     public final void digest(byte[] out, int off) throws DigestException {
-        md.digest(out, off, out.length);
+        md.digest(out, off, out.length - off);
     }
 }