PATCH: java.security improvements
Casey Marshall
rsdio@metastatic.org
Fri Jan 17 16:08:00 GMT 2003
Hello,
Attached is a patch for a number of classes in the java.security package
with attempts to fix and/or improve upon the `getInstance' factory
methods of MessageDigest, KeyFactory, etc. The basic idea was to replace
the bulk of each `getInstance' with a call to a new package-private
class method (and class) Engine.getInstance, which should both make
these factory methods more robust without repeating a lot of code in
each class. There is also a fix for a bias in the `next(int numBits)'
method of SecureRandom (filed as PR 9271).
One new package-private class -- java.security.Engine -- is added.
Summary of changes follows:
* AlgorithmParameterGenerator: modify getInstance methods to use
the Engine class; adds JDK1.4 getInstance method; getInstance
throws an exception if provider argument is null; minor
comment improvements or elaborations; copyright updated to
include 2003.
* AlgorithmParameters: likewise.
* KeyFactory: likewise.
* KeyPairGenerator: likewise.
* MessageDigest: likewise.
* Signature: likewise.
* SecureRandom: likewise; fix for a bias in the `next(int
numBits)' method.
* KeyStore: modify getInstance methods to use the Engine class.
* Engine: new package-private class with a single package-
private class method that implements a general getInstance.
* libjava/Makefile.am: adds java/security/Engine.java.
Cheers,
--
Casey Marshall || rsdio@metastatic.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libjava.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030117/5f098b99/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 252 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20030117/5f098b99/attachment.sig>
More information about the Java-patches
mailing list