Top Description Inners Constructors Methods
sun.security.rsa

public Class RSAUtil

extends Object
Class Inheritance
Imports
java.io.IOException, java.security.*, java.security.spec.*, sun.security.util.DerInputStream, .DerOutputStream, .DerValue, .ObjectIdentifier, sun.security.x509.AlgorithmId

Utility class for SunRsaSign provider. Currently used by RSAKeyPairGenerator and RSAKeyFactory.
Since
11

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static AlgorithmParameterSpec
public static AlgorithmId
public static byte[]
encodeSignature(ObjectIdentifier oid, byte[] digest)

Encode the digest, return the to-be-signed data.

pack-priv static byte[]
encodeSignatureWithoutNULL(ObjectIdentifier oid, byte[] digest)

Encode the digest without the NULL params, return the to-be-signed data.

public static AlgorithmParameters
public static AlgorithmParameterSpec
public static Object[]
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RSAUtilback to summary
public RSAUtil()

Method Detail

checkParamsAgainstTypeback to summary
public static AlgorithmParameterSpec checkParamsAgainstType(RSAUtil.KeyType type, AlgorithmParameterSpec paramSpec) throws ProviderException
createAlgorithmIdback to summary
public static AlgorithmId createAlgorithmId(RSAUtil.KeyType type, AlgorithmParameterSpec paramSpec) throws ProviderException
encodeSignatureback to summary
public static byte[] encodeSignature(ObjectIdentifier oid, byte[] digest)

Encode the digest, return the to-be-signed data. Also used by the PKCS#11 provider.

encodeSignatureWithoutNULLback to summary
pack-priv static byte[] encodeSignatureWithoutNULL(ObjectIdentifier oid, byte[] digest)

Encode the digest without the NULL params, return the to-be-signed data. This is only used by SunRsaSign.

getParamsback to summary
public static AlgorithmParameters getParams(RSAUtil.KeyType type, AlgorithmParameterSpec spec) throws ProviderException
getParamSpecback to summary
public static AlgorithmParameterSpec getParamSpec(AlgorithmParameters params) throws ProviderException
getTypeAndParamSpecback to summary
public static Object[] getTypeAndParamSpec(AlgorithmId algid) throws ProviderException
requireNonNullback to summary
private static void requireNonNull(Object obj, String msg)
sun.security.rsa back to summary

public final Enum RSAUtil.KeyType

extends Enum<RSAUtil.KeyType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final ObjectIdentifier
pack-priv final Class<? extends AlgorithmParameterSpec>
public static final RSAUtil.KeyType
public static final RSAUtil.KeyType

Constructor Summary

AccessConstructor and Description
private
KeyType(String keyAlgo, ObjectIdentifier oid, Class<? extends AlgorithmParameterSpec> paramSpecCls)

Method Summary

Modifier and TypeMethod and Description
public static RSAUtil.KeyType
lookup(String name)

public static RSAUtil.KeyType
public static RSAUtil.KeyType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

keyAlgoback to summary
pack-priv final String keyAlgo
oidback to summary
pack-priv final ObjectIdentifier oid
paramSpecClsback to summary
pack-priv final Class<? extends AlgorithmParameterSpec> paramSpecCls
PSSback to summary
public static final RSAUtil.KeyType PSS
RSAback to summary
public static final RSAUtil.KeyType RSA

Constructor Detail

KeyTypeback to summary
private KeyType(String keyAlgo, ObjectIdentifier oid, Class<? extends AlgorithmParameterSpec> paramSpecCls)

Method Detail

lookupback to summary
public static RSAUtil.KeyType lookup(String name) throws ProviderException
valueOfback to summary
public static RSAUtil.KeyType valueOf(String name)
valuesback to summary
public static RSAUtil.KeyType[] values()