summaryrefslogtreecommitdiff
path: root/javax/crypto/Mac.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/crypto/Mac.java')
-rw-r--r--javax/crypto/Mac.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/javax/crypto/Mac.java b/javax/crypto/Mac.java
index abbff8b23..055b20a4f 100644
--- a/javax/crypto/Mac.java
+++ b/javax/crypto/Mac.java
@@ -41,6 +41,7 @@ package javax.crypto;
import gnu.java.security.Engine;
import java.lang.reflect.InvocationTargetException;
+import java.nio.ByteBuffer;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
@@ -398,6 +399,18 @@ public class Mac implements Cloneable
}
/**
+ * Update this MAC with the remaining bytes in the given buffer
+ * @param buffer The input buffer.
+ * @since 1.5
+ */
+ public final void update (final ByteBuffer buffer)
+ {
+ if (virgin)
+ throw new IllegalStateException ("not initialized");
+ macSpi.engineUpdate(buffer);
+ }
+
+ /**
* Clone this instance, if the underlying implementation supports it.
*
* @return A clone of this instance.