summaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/java/security/prng/MDGenerator.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/security/prng/MDGenerator.java')
-rw-r--r--libjava/classpath/gnu/java/security/prng/MDGenerator.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/libjava/classpath/gnu/java/security/prng/MDGenerator.java b/libjava/classpath/gnu/java/security/prng/MDGenerator.java
index 255647d1c5f..073c559ae04 100644
--- a/libjava/classpath/gnu/java/security/prng/MDGenerator.java
+++ b/libjava/classpath/gnu/java/security/prng/MDGenerator.java
@@ -122,6 +122,20 @@ public class MDGenerator extends BasePRNG implements Cloneable
md.update(buffer, 0, buffer.length);
}
+ public void addRandomByte (final byte b)
+ {
+ if (md == null)
+ throw new IllegalStateException ("not initialized");
+ md.update (b);
+ }
+
+ public void addRandomBytes (final byte[] buf, final int off, final int len)
+ {
+ if (md == null)
+ throw new IllegalStateException ("not initialized");
+ md.update (buf, off, len);
+ }
+
// Cloneable interface implementation ---------------------------------------
public Object clone() throws CloneNotSupportedException