public class PKCS8ShroudedKeyBag extends KeyBag
SafeBag,
Attributes| Modifier | Constructor and Description |
|---|---|
protected |
PKCS8ShroudedKeyBag()
The default constructor.
|
protected |
PKCS8ShroudedKeyBag(KeyBag keyBag)
Creates a new PKCS8ShroudedKeyBag from a KeyBag.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes the PKCS8ShroudedKeyBag given as ASN1Object.
|
void |
decrypt(char[] password)
Decrypts this KeyBag using the given password.
|
void |
encrypt(char[] password,
AlgorithmID algorithm,
int iterationCount)
Encrypts this KeyBag using the given password.
|
void |
encrypt(char[] password,
AlgorithmID algorithm,
java.security.SecureRandom random,
int iterationCount)
Encrypts this KeyBag using the given password.
|
ASN1Object |
toASN1Object()
Returns this PKCS8ShroudedKeyBag as ASN1Object.
|
java.lang.String |
toString()
Returns a String representation of this PKCS8ShroudedKeyBag.
|
getPrivateKeycreate, encodeSafeContents, encodeSafeContentsAsASN1Object, getBagType, parseSafeContents, parseSafeContents, registergetAttributes, getFriendlyName, getLocalKeyID, setAttributes, setFriendlyName, setLocalKeyIDprotected PKCS8ShroudedKeyBag()
protected PKCS8ShroudedKeyBag(KeyBag keyBag)
public void decode(ASN1Object obj) throws CodingException
decode in interface ASN1Typedecode in class KeyBagobj - the PKCS8ShroudedKeyBag as ASN1ObjectCodingException - if the PKCS8ShroudedKeyBag cannot be decodedpublic ASN1Object toASN1Object() throws CodingException
toASN1Object in interface ASN1TypetoASN1Object in class KeyBagCodingException - if an de/encoding error occurspublic void decrypt(char[] password)
throws java.security.NoSuchAlgorithmException,
java.security.GeneralSecurityException
java.security.NoSuchAlgorithmExceptionjava.security.GeneralSecurityExceptionpublic void encrypt(char[] password,
AlgorithmID algorithm,
int iterationCount)
throws java.security.NoSuchAlgorithmException
password - the password to be usedalgorithm - the algorithm to be used, e.g.
PbeWithSHAAnd3_KeyTripleDES_CBCiterationCount - the iteration count to be usedjava.security.NoSuchAlgorithmExceptionpublic void encrypt(char[] password,
AlgorithmID algorithm,
java.security.SecureRandom random,
int iterationCount)
throws java.security.NoSuchAlgorithmException
password - the password to be usedalgorithm - the algorithm to be used, e.g.
PbeWithSHAAnd3_KeyTripleDES_CBCrandom - the SecureRandom to be usediterationCount - the iteration count to be usedjava.security.NoSuchAlgorithmException