|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.atlassian.security.auth.trustedapps.BaseEncryptionProvider
com.atlassian.security.auth.trustedapps.BouncyCastleEncryptionProvider
| Constructor Summary | |
BouncyCastleEncryptionProvider()
|
|
| Method Summary | |
EncryptedCertificate |
createEncryptedCertificate(java.lang.String userName,
java.security.PrivateKey privateKey,
java.lang.String appId)
Create a new encrypted certificate for transmission to another application |
ApplicationCertificate |
decodeEncryptedCertificate(EncryptedCertificate encCert,
java.security.PublicKey publicKey,
java.lang.String appId)
Decode an encrypted certificate to retrieve its ApplicationCertificate |
java.security.KeyPair |
generateNewKeyPair()
Generates a new KeyPair. |
java.security.PrivateKey |
toPrivateKey(byte[] encodedForm)
Decodes the given form into the real key object according to the given algorithm Uses Bouncy Castle as a provider |
java.security.PublicKey |
toPublicKey(byte[] encodedForm)
Decodes the given form into the real key object according to the given algorithm Uses Bouncy Castle as a provider |
| Methods inherited from class com.atlassian.security.auth.trustedapps.BaseEncryptionProvider |
generateUID, getApplicationCertificate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BouncyCastleEncryptionProvider()
| Method Detail |
public java.security.PublicKey toPublicKey(byte[] encodedForm)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.security.NoSuchProviderException
encodedForm - the byte[] containing the key data
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
java.security.NoSuchProviderException
public java.security.PrivateKey toPrivateKey(byte[] encodedForm)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.security.NoSuchProviderException
encodedForm - the PKS8 encoded key data
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
java.security.NoSuchProviderException
public java.security.KeyPair generateNewKeyPair()
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException
Given algorithm name will be used to generate the key pair. It is mandatory. Security provides parameter is optional and can be null in which case the choice of a provider is left to the VM. Key size is optional and can be set to -1 in which case the default size is used.
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
public ApplicationCertificate decodeEncryptedCertificate(EncryptedCertificate encCert,
java.security.PublicKey publicKey,
java.lang.String appId)
throws InvalidCertificateException
EncryptionProvider
encCert - the encrypted certificate of the applicationpublicKey - the application's public keyappId - the application's ID
InvalidCertificateException - if the certificate was malformed, or could not be decrypted
public EncryptedCertificate createEncryptedCertificate(java.lang.String userName,
java.security.PrivateKey privateKey,
java.lang.String appId)
EncryptionProvider
userName - the username to certifyprivateKey - the private key of this applicationappId - the ID of this application
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||