Top Description Inners Fields Constructors Methods
sun.security.jca

public final Class JCAUtil

extends Object
Class Inheritance
Imports
java.security.PublicKey, .SecureRandom, java.security.cert.Certificate, .X509Certificate, jdk.internal.event.EventHelper, .X509CertificateEvent, sun.security.util.KeyUtil

Collection of static utility methods used by the security framework.
Author
Andreas Sterbenz
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final int
private static volatile SecureRandom

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
public static SecureRandom
getDefSecureRandom()

Get the default SecureRandom instance.

public static SecureRandom
getSecureRandom()

Get a SecureRandom instance.

public static int
getTempArraySize(int totalSize)

Get the size of a temporary buffer array to use in order to be cache efficient.

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARRAY_SIZEback to summary
private static final int ARRAY_SIZE
defback to summary
private static volatile SecureRandom def

Constructor Detail

JCAUtilback to summary
private JCAUtil()

Method Detail

clearDefSecureRandomback to summary
pack-priv static void clearDefSecureRandom()
getDefSecureRandomback to summary
public static SecureRandom getDefSecureRandom()

Get the default SecureRandom instance. This method is the optimized version of "new SecureRandom()" which re-uses the default SecureRandom impl if the provider table is the same.

getSecureRandomback to summary
public static SecureRandom getSecureRandom()

Get a SecureRandom instance. This method should be used by JDK internal code in favor of calling "new SecureRandom()". That needs to iterate through the provider table to find the default SecureRandom implementation, which is fairly inefficient.

getTempArraySizeback to summary
public static int getTempArraySize(int totalSize)

Get the size of a temporary buffer array to use in order to be cache efficient. totalSize indicates the total amount of data to be buffered. Used by the engineUpdate(ByteBuffer) methods.

tryCommitCertEventback to summary
public static void tryCommitCertEvent(Certificate cert)
sun.security.jca back to summary

private Class JCAUtil.CachedSecureRandomHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static SecureRandom

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
public static SecureRandom instance

Constructor Detail

CachedSecureRandomHolderback to summary
private CachedSecureRandomHolder()