summaryrefslogtreecommitdiff
path: root/java/security/Signature.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/security/Signature.java')
-rw-r--r--java/security/Signature.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/security/Signature.java b/java/security/Signature.java
index 845a77a8b..68ae99d42 100644
--- a/java/security/Signature.java
+++ b/java/security/Signature.java
@@ -40,6 +40,7 @@ package java.security;
import gnu.java.security.Engine;
+import java.nio.ByteBuffer;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.security.spec.AlgorithmParameterSpec;
@@ -467,6 +468,22 @@ public abstract class Signature extends SignatureSpi
else
throw new SignatureException();
}
+
+ /**
+ * Update this signature with the {@link java.nio.Buffer#remaining()}
+ * bytes of the input buffer.
+ *
+ * @param input The input buffer.
+ * @throws SignatureException If this instance was not properly
+ * initialized.
+ */
+ public final void update(ByteBuffer input) throws SignatureException
+ {
+ if (state != UNINITIALIZED)
+ engineUpdate(input);
+ else
+ throw new SignatureException("not initialized");
+ }
/**
* Returns the name of the algorithm currently used. The names of algorithms