Additional top-level class in compilation unit: CipherForKeyProtector.
Cipher class.
Private keys are protected using the JCE mechanism, and are recovered using
either the JDK or JCE mechanism, depending on how the key has been
protected. This allows us to parse Sun's keystore implementation that ships
with JDK 1.2.
JceKeyStore
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final char[] | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv byte[] | protect(PrivateKey key)
Protects the given cleartext private key, using the password provided at construction time. |
| pack-priv Key | |
| private byte[] | |
| pack-priv SealedObject | |
| pack-priv Key | unseal(SealedObject so, int
Maximum possible length of so.
If bigger, must be illegal. maxLength)Unseals the sealed key. |
| DEFAULT_ITERATION_COUNT | back to summary |
|---|---|
| private static final int DEFAULT_ITERATION_COUNT | |
| DIGEST_LEN | back to summary |
|---|---|
| private static final int DIGEST_LEN | |
| ITERATION_COUNT | back to summary |
|---|---|
| private static final int ITERATION_COUNT | |
| MAX_ITERATION_COUNT | back to summary |
|---|---|
| private static final int MAX_ITERATION_COUNT | |
| MIN_ITERATION_COUNT | back to summary |
|---|---|
| private static final int MIN_ITERATION_COUNT | |
| password | back to summary |
|---|---|
| private final char[] password | |
| SALT_LEN | back to summary |
|---|---|
| private static final int SALT_LEN | |
| KeyProtector | back to summary |
|---|---|
| pack-priv KeyProtector(char[] password) | |
| protect | back to summary |
|---|---|
| pack-priv byte[] protect(PrivateKey key) throws Exception Protects the given cleartext private key, using the password provided at construction time. | |
| recover | back to summary |
|---|---|
| pack-priv Key recover(EncryptedPrivateKeyInfo encrInfo) throws UnrecoverableKeyException, NoSuchAlgorithmException | |
| recover | back to summary |
|---|---|
| private byte[] recover(byte[] protectedKey) throws UnrecoverableKeyException, NoSuchAlgorithmException | |
| seal | back to summary |
|---|---|
| pack-priv SealedObject seal(Key key) throws Exception Seals the given cleartext key, using the password provided at construction time | |
| unseal | back to summary |
|---|---|
| pack-priv Key unseal(SealedObject so, int maxLength) throws NoSuchAlgorithmException, UnrecoverableKeyException Unseals the sealed key.
| |