public final class SecurityTestHelper extends Object
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static KeyInfoCredentialResolver |
buildBasicInlineKeyInfoResolver()
推奨されていません。
Get a basic KeyInfo credential resolver which can process standard inline
data - RSAKeyValue, DSAKeyValue, X509Data.
|
static DSAPrivateKey |
buildJavaDSAPrivateKey(String base64EncodedKey)
推奨されていません。
Build Java DSA private key from base64 encoding.
|
static DSAPublicKey |
buildJavaDSAPublicKey(String base64EncodedKey)
推奨されていません。
Build Java DSA public key from base64 encoding.
|
static PrivateKey |
buildJavaPrivateKey(String base64EncodedKey)
推奨されていません。
Build Java private key from base64 encoding. The key should have no password.
|
static RSAPrivateKey |
buildJavaRSAPrivateKey(String base64EncodedKey)
推奨されていません。
Build Java RSA private key from base64 encoding.
|
static RSAPublicKey |
buildJavaRSAPublicKey(String base64EncodedKey)
推奨されていません。
Build Java RSA public key from base64 encoding.
|
static X509Certificate |
buildJavaX509Cert(String base64Cert)
推奨されていません。
Build Java certificate from base64 encoding.
|
static X509CRL |
buildJavaX509CRL(String base64CRL)
推奨されていません。
Build Java CRL from base64 encoding.
|
static PublicKey |
buildKey(KeySpec keySpec,
String keyAlgorithm)
推奨されていません。
Generates a public key from the given key spec.
|
static SecretKey |
generateKey(String algo,
int keyLength,
String provider)
推奨されていません。
Generate a random symmetric key.
|
static Credential |
generateKeyAndCredential(String algorithmURI)
推奨されていません。
Generate a random symmetric key and return in a BasicCredential.
|
static SecretKey |
generateKeyFromURI(String algoURI)
推奨されていません。
Randomly generates a Java JCE symmetric Key object from the specified XML Encryption algorithm URI.
|
static KeyPair |
generateKeyPair(String algo,
int keyLength,
String provider)
推奨されていません。
Generate a random asymmetric key pair.
|
static Credential |
generateKeyPairAndCredential(String algorithmURI,
int keyLength,
boolean includePrivate)
推奨されていません。
Generate a random asymmetric key pair and return in a BasicCredential.
|
static KeyPair |
generateKeyPairFromURI(String algoURI,
int keyLength)
推奨されていません。
Randomly generates a Java JCE KeyPair object from the specified XML Encryption algorithm URI.
|
public static X509Certificate buildJavaX509Cert(String base64Cert) throws CertificateException
base64Cert - base64-encoded certificateCertificateException - thrown if there is an error constructing certificatepublic static X509CRL buildJavaX509CRL(String base64CRL) throws CertificateException, CRLException
base64CRL - base64-encoded CRLCertificateException - thrown if there is an error constructing certificateCRLException - thrown if there is an error constructing CRLpublic static DSAPublicKey buildJavaDSAPublicKey(String base64EncodedKey) throws KeyException
base64EncodedKey - base64-encoded DSA public keyKeyException - thrown if there is an error constructing keypublic static RSAPublicKey buildJavaRSAPublicKey(String base64EncodedKey) throws KeyException
base64EncodedKey - base64-encoded RSA public keyKeyException - thrown if there is an error constructing keypublic static RSAPrivateKey buildJavaRSAPrivateKey(String base64EncodedKey) throws KeyException
base64EncodedKey - base64-encoded RSA private keyKeyException - thrown if there is an error constructing keypublic static DSAPrivateKey buildJavaDSAPrivateKey(String base64EncodedKey) throws KeyException
base64EncodedKey - base64-encoded DSA private keyKeyException - thrown if there is an error constructing keypublic static PrivateKey buildJavaPrivateKey(String base64EncodedKey) throws KeyException
base64EncodedKey - base64-encoded private keyKeyException - thrown if there is an error constructing keypublic static PublicKey buildKey(KeySpec keySpec, String keyAlgorithm) throws KeyException
keySpec - KeySpec specification for the keykeyAlgorithm - key generation algorithm, only DSA and RSA supportedPublicKeyKeyException - thrown if the key algorithm is not supported by the JCE or the key spec does not
contain valid informationpublic static SecretKey generateKeyFromURI(String algoURI) throws NoSuchAlgorithmException, NoSuchProviderException
algoURI - The XML Encryption algorithm URINoSuchProviderException - provider not foundNoSuchAlgorithmException - algorithm not foundpublic static KeyPair generateKeyPairFromURI(String algoURI, int keyLength) throws NoSuchAlgorithmException, NoSuchProviderException
algoURI - The XML Encryption algorithm URIkeyLength - the length of key to generateNoSuchProviderException - provider not foundNoSuchAlgorithmException - algorithm not foundpublic static SecretKey generateKey(String algo, int keyLength, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
algo - key algorithmkeyLength - key lengthprovider - JCA providerNoSuchAlgorithmException - algorithm not foundNoSuchProviderException - provider not foundpublic static KeyPair generateKeyPair(String algo, int keyLength, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
algo - key algorithmkeyLength - key lengthprovider - JCA providerNoSuchAlgorithmException - algorithm not foundNoSuchProviderException - provider not foundpublic static Credential generateKeyAndCredential(String algorithmURI) throws NoSuchAlgorithmException, NoSuchProviderException
algorithmURI - The XML Encryption algorithm URINoSuchAlgorithmException - algorithm not foundNoSuchProviderException - provider not foundpublic static Credential generateKeyPairAndCredential(String algorithmURI, int keyLength, boolean includePrivate) throws NoSuchAlgorithmException, NoSuchProviderException
algorithmURI - The XML Encryption algorithm URIkeyLength - key lengthincludePrivate - if true, the private key will be included as wellNoSuchAlgorithmException - algorithm not foundNoSuchProviderException - provider not foundpublic static KeyInfoCredentialResolver buildBasicInlineKeyInfoResolver()
Copyright © 2012. All Rights Reserved.