|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.xml.security.SecurityTestHelper
public final class SecurityTestHelper
| Method Summary | |
|---|---|
static KeyInfoCredentialResolver |
buildBasicInlineKeyInfoResolver()
Deprecated. Get a basic KeyInfo credential resolver which can process standard inline data - RSAKeyValue, DSAKeyValue, X509Data. |
static java.security.interfaces.DSAPrivateKey |
buildJavaDSAPrivateKey(java.lang.String base64EncodedKey)
Deprecated. Build Java DSA private key from base64 encoding. |
static java.security.interfaces.DSAPublicKey |
buildJavaDSAPublicKey(java.lang.String base64EncodedKey)
Deprecated. Build Java DSA public key from base64 encoding. |
static java.security.PrivateKey |
buildJavaPrivateKey(java.lang.String base64EncodedKey)
Deprecated. Build Java private key from base64 encoding. The key should have no password. |
static java.security.interfaces.RSAPrivateKey |
buildJavaRSAPrivateKey(java.lang.String base64EncodedKey)
Deprecated. Build Java RSA private key from base64 encoding. |
static java.security.interfaces.RSAPublicKey |
buildJavaRSAPublicKey(java.lang.String base64EncodedKey)
Deprecated. Build Java RSA public key from base64 encoding. |
static java.security.cert.X509Certificate |
buildJavaX509Cert(java.lang.String base64Cert)
Deprecated. Build Java certificate from base64 encoding. |
static java.security.cert.X509CRL |
buildJavaX509CRL(java.lang.String base64CRL)
Deprecated. Build Java CRL from base64 encoding. |
static java.security.PublicKey |
buildKey(java.security.spec.KeySpec keySpec,
java.lang.String keyAlgorithm)
Deprecated. Generates a public key from the given key spec. |
static javax.crypto.SecretKey |
generateKey(java.lang.String algo,
int keyLength,
java.lang.String provider)
Deprecated. Generate a random symmetric key. |
static Credential |
generateKeyAndCredential(java.lang.String algorithmURI)
Deprecated. Generate a random symmetric key and return in a BasicCredential. |
static javax.crypto.SecretKey |
generateKeyFromURI(java.lang.String algoURI)
Deprecated. Randomly generates a Java JCE symmetric Key object from the specified XML Encryption algorithm URI. |
static java.security.KeyPair |
generateKeyPair(java.lang.String algo,
int keyLength,
java.lang.String provider)
Deprecated. Generate a random asymmetric key pair. |
static Credential |
generateKeyPairAndCredential(java.lang.String algorithmURI,
int keyLength,
boolean includePrivate)
Deprecated. Generate a random asymmetric key pair and return in a BasicCredential. |
static java.security.KeyPair |
generateKeyPairFromURI(java.lang.String algoURI,
int keyLength)
Deprecated. Randomly generates a Java JCE KeyPair object from the specified XML Encryption algorithm URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.security.cert.X509Certificate buildJavaX509Cert(java.lang.String base64Cert)
throws java.security.cert.CertificateException
base64Cert - base64-encoded certificate
java.security.cert.CertificateException - thrown if there is an error constructing certificate
public static java.security.cert.X509CRL buildJavaX509CRL(java.lang.String base64CRL)
throws java.security.cert.CertificateException,
java.security.cert.CRLException
base64CRL - base64-encoded CRL
java.security.cert.CertificateException - thrown if there is an error constructing certificate
java.security.cert.CRLException - thrown if there is an error constructing CRL
public static java.security.interfaces.DSAPublicKey buildJavaDSAPublicKey(java.lang.String base64EncodedKey)
throws java.security.KeyException
base64EncodedKey - base64-encoded DSA public key
java.security.KeyException - thrown if there is an error constructing key
public static java.security.interfaces.RSAPublicKey buildJavaRSAPublicKey(java.lang.String base64EncodedKey)
throws java.security.KeyException
base64EncodedKey - base64-encoded RSA public key
java.security.KeyException - thrown if there is an error constructing key
public static java.security.interfaces.RSAPrivateKey buildJavaRSAPrivateKey(java.lang.String base64EncodedKey)
throws java.security.KeyException
base64EncodedKey - base64-encoded RSA private key
java.security.KeyException - thrown if there is an error constructing key
public static java.security.interfaces.DSAPrivateKey buildJavaDSAPrivateKey(java.lang.String base64EncodedKey)
throws java.security.KeyException
base64EncodedKey - base64-encoded DSA private key
java.security.KeyException - thrown if there is an error constructing key
public static java.security.PrivateKey buildJavaPrivateKey(java.lang.String base64EncodedKey)
throws java.security.KeyException
base64EncodedKey - base64-encoded private key
java.security.KeyException - thrown if there is an error constructing key
public static java.security.PublicKey buildKey(java.security.spec.KeySpec keySpec,
java.lang.String keyAlgorithm)
throws java.security.KeyException
keySpec - KeySpec specification for the keykeyAlgorithm - key generation algorithm, only DSA and RSA supported
PublicKey
java.security.KeyException - thrown if the key algorithm is not supported by the JCE or the key spec does not
contain valid information
public static javax.crypto.SecretKey generateKeyFromURI(java.lang.String algoURI)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algoURI - The XML Encryption algorithm URI
java.security.NoSuchProviderException - provider not found
java.security.NoSuchAlgorithmException - algorithm not found
public static java.security.KeyPair generateKeyPairFromURI(java.lang.String algoURI,
int keyLength)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algoURI - The XML Encryption algorithm URIkeyLength - the length of key to generate
java.security.NoSuchProviderException - provider not found
java.security.NoSuchAlgorithmException - algorithm not found
public static javax.crypto.SecretKey generateKey(java.lang.String algo,
int keyLength,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algo - key algorithmkeyLength - key lengthprovider - JCA provider
java.security.NoSuchAlgorithmException - algorithm not found
java.security.NoSuchProviderException - provider not found
public static java.security.KeyPair generateKeyPair(java.lang.String algo,
int keyLength,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algo - key algorithmkeyLength - key lengthprovider - JCA provider
java.security.NoSuchAlgorithmException - algorithm not found
java.security.NoSuchProviderException - provider not found
public static Credential generateKeyAndCredential(java.lang.String algorithmURI)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algorithmURI - The XML Encryption algorithm URI
java.security.NoSuchAlgorithmException - algorithm not found
java.security.NoSuchProviderException - provider not found
public static Credential generateKeyPairAndCredential(java.lang.String algorithmURI,
int keyLength,
boolean includePrivate)
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
algorithmURI - The XML Encryption algorithm URIkeyLength - key lengthincludePrivate - if true, the private key will be included as well
java.security.NoSuchAlgorithmException - algorithm not found
java.security.NoSuchProviderException - provider not foundpublic static KeyInfoCredentialResolver buildBasicInlineKeyInfoResolver()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||