javax.crypto.CipherSpi
| Modifier and Type | Class and Description |
|---|---|
| private static record | |
| public static class | |
| pack-priv static class | |
| public static class | |
| public static class | |
| pack-priv static class | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private static final int | |
| private int | |
| private final int | |
| pack-priv static final int | |
| private final String | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| private static void | |
| pack-priv static byte[] | |
| pack-priv static byte[] | |
| pack-priv int | |
| pack-priv AlgorithmParameters | |
| pack-priv PKCS12PBECipherCore. | |
| private static int | |
| private static final PBEParameterSpec |
| algo | back to summary |
|---|---|
| private final String algo | |
| CIPHER_IV | back to summary |
|---|---|
| pack-priv static final int CIPHER_IV | |
| CIPHER_KEY | back to summary |
|---|---|
| pack-priv static final int CIPHER_KEY | |
| DEFAULT_COUNT | back to summary |
|---|---|
| pack-priv static final int DEFAULT_COUNT | |
| DEFAULT_SALT_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_SALT_LENGTH | |
| iCount | back to summary |
|---|---|
| private int iCount | |
| keySize | back to summary |
|---|---|
| private final int keySize | |
| MAC_KEY | back to summary |
|---|---|
| pack-priv static final int MAC_KEY | |
| pbeAlgo | back to summary |
|---|---|
| private final String pbeAlgo | |
| salt | back to summary |
|---|---|
| private byte[] salt | |
| PKCS12PBECipherCore | back to summary |
|---|---|
| pack-priv PKCS12PBECipherCore(String symmCipherAlg, int keySizeInBits) throws NoSuchAlgorithmException | |
| addOne | back to summary |
|---|---|
| private static void addOne(int len, byte[] b) | |
| addTwo | back to summary |
|---|---|
| private static void addTwo(int len, byte[] src, byte[] dst, int offset) | |
| concat | back to summary |
|---|---|
| private static void concat(byte[] src, byte[] dst, int start, int len) | |
| derive | back to summary |
|---|---|
| pack-priv static byte[] derive(char[] chars, byte[] salt, int ic, int n, int type) | |
| derive | back to summary |
|---|---|
| pack-priv static byte[] derive(char[] chars, byte[] salt, int ic, int n, int type, String hashAlgo, int blockLength) | |
| implGetKeySize | back to summary |
|---|---|
| pack-priv int implGetKeySize(Key key) throws InvalidKeyException | |
| implGetParameters | back to summary |
|---|---|
| pack-priv AlgorithmParameters implGetParameters() | |
| implInit | back to summary |
|---|---|
| pack-priv PKCS12PBECipherCore. | |
| roundup | back to summary |
|---|---|
| private static int roundup(int x, int y) | |
| toParamSpec | back to summary |
|---|---|
| private static final PBEParameterSpec toParamSpec(AlgorithmParameters ap) throws InvalidAlgorithmParameterException | |
| Modifier and Type | Field and Description |
|---|---|
| private final IvParameterSpec | |
| private final SecretKey |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public IvParameterSpec | |
| public SecretKey | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| iv | back to summary |
|---|---|
| private final IvParameterSpec iv Record Component accessed by iv(). | |
| key | back to summary |
|---|---|
| private final SecretKey key Record Component accessed by key(). | |
| KeyAndIv | back to summary |
|---|---|
| private KeyAndIv(SecretKey key, IvParameterSpec iv) | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| iv | back to summary |
|---|---|
| public IvParameterSpec iv() Record Component getter of iv. | |
| key | back to summary |
|---|---|
| public SecretKey key() Record Component getter of key. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private final PKCS12PBECipherCore |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | engineGetKeySize(Key key)
Overrides com. Returns the key size of the given key object. |
| protected AlgorithmParameters | engineGetParameters()
Overrides com. Returns the parameters used with this cipher. |
| protected void | engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Overrides com. Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness. |
| protected void | engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineInit(int opmode, Key key, SecureRandom random)
Overrides com. Initializes this cipher with a key and a source of randomness. |
| protected void | engineSetMode(String mode)
Overrides com. Sets the mode of this cipher. |
| protected void | engineSetPadding(String paddingScheme)
Overrides com. Sets the padding mechanism of this cipher. |
| core | back to summary |
|---|---|
| private final PKCS12PBECipherCore core | |
| PBEWithSHA1AndDESede | back to summary |
|---|---|
| public PBEWithSHA1AndDESede() throws NoSuchAlgorithmException | |
| engineGetKeySize | back to summary |
|---|---|
| protected int engineGetKeySize(Key key) throws InvalidKeyException Overrides com. Doc from com. Returns the key size of the given key object.
| |
| engineGetParameters | back to summary |
|---|---|
| protected AlgorithmParameters engineGetParameters() Overrides com. Doc from com. Returns the parameters used with this cipher. The returned parameters may be the same that were used to initialize this cipher, or may contain the default set of parameters or a set of randomly generated parameters used by the underlying cipher implementation (provided that the underlying cipher implementation uses a default set of parameters or creates new parameters if it needs parameters but was not initialized with any).
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from com. Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness. The cipher is initialized for one of the following four operations:
encryption, decryption, key wrapping or key unwrapping, depending on
the value of If this cipher (including its underlying feedback or padding scheme)
requires any random bytes, it will get them from
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException Overrides com. Doc from com. Initializes this cipher with a key and a source of randomness. The cipher is initialized for one of the following four operations:
encryption, decryption, key wrapping or key unwrapping, depending on
the value of If this cipher requires an initialization vector (IV), it will get
it from This method also cleans existing buffer and other related state information.
| |
| engineSetMode | back to summary |
|---|---|
| protected void engineSetMode(String mode) throws NoSuchAlgorithmException Overrides com. Doc from com. Sets the mode of this cipher.
| |
| engineSetPadding | back to summary |
|---|---|
| protected void engineSetPadding(String paddingScheme) throws NoSuchPaddingException Overrides com. Doc from com. Sets the padding mechanism of this cipher.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final PKCS12PBECipherCore |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected AlgorithmParameters | engineGetParameters()
Overrides com. Returns the parameters used with this cipher. |
| protected void | engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineInit(int opmode, Key key, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineSetMode(String mode)
Overrides com. Sets the mode of this cipher. |
| protected void | engineSetPadding(String paddingScheme)
Overrides com. Sets the padding mechanism of this cipher. |
| core | back to summary |
|---|---|
| private final PKCS12PBECipherCore core | |
| PBEWithSHA1AndRC2 | back to summary |
|---|---|
| public PBEWithSHA1AndRC2(int keysize) throws NoSuchAlgorithmException | |
| engineGetParameters | back to summary |
|---|---|
| protected AlgorithmParameters engineGetParameters() Overrides com. Doc from javax. Returns the parameters used with this cipher. The returned parameters may be the same that were used to initialize
this cipher, or may contain additional default or random parameter
values used by the underlying cipher implementation. If the required
parameters were not supplied and can be generated by the cipher, the
generated parameters are returned. Otherwise,
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters that cannot be
derived from the given If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineSetMode | back to summary |
|---|---|
| protected void engineSetMode(String mode) throws NoSuchAlgorithmException Overrides com. Doc from javax. Sets the mode of this cipher.
| |
| engineSetPadding | back to summary |
|---|---|
| protected void engineSetPadding(String paddingScheme) throws NoSuchPaddingException Overrides com. Doc from javax. Sets the padding mechanism of this cipher.
| |
| Access | Constructor and Description |
|---|---|
| public |
| PBEWithSHA1AndRC2_128 | back to summary |
|---|---|
| public PBEWithSHA1AndRC2_128() throws NoSuchAlgorithmException | |
| Access | Constructor and Description |
|---|---|
| public |
| PBEWithSHA1AndRC2_40 | back to summary |
|---|---|
| public PBEWithSHA1AndRC2_40() throws NoSuchAlgorithmException | |
| Modifier and Type | Field and Description |
|---|---|
| private final PKCS12PBECipherCore |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | engineGetKeySize(Key key)
Overrides com. Returns the key size of the given key object in bits. |
| protected AlgorithmParameters | engineGetParameters()
Overrides com. Returns the parameters used with this cipher. |
| protected void | engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineInit(int opmode, Key key, SecureRandom random)
Overrides com. Initializes this |
| protected void | engineSetMode(String mode)
Overrides com. Sets the mode of this cipher. |
| protected void | engineSetPadding(String paddingScheme)
Overrides com. Sets the padding mechanism of this cipher. |
| core | back to summary |
|---|---|
| private final PKCS12PBECipherCore core | |
| PBEWithSHA1AndRC4 | back to summary |
|---|---|
| public PBEWithSHA1AndRC4(int keysize) throws NoSuchAlgorithmException | |
| engineGetKeySize | back to summary |
|---|---|
| protected int engineGetKeySize(Key key) throws InvalidKeyException Overrides com. Doc from javax. Returns the key size of the given key object in bits. This concrete method has been added to this previously-defined
abstract class. It throws an
| |
| engineGetParameters | back to summary |
|---|---|
| protected AlgorithmParameters engineGetParameters() Overrides com. Doc from javax. Returns the parameters used with this cipher. The returned parameters may be the same that were used to initialize
this cipher, or may contain additional default or random parameter
values used by the underlying cipher implementation. If the required
parameters were not supplied and can be generated by the cipher, the
generated parameters are returned. Otherwise,
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException Overrides com. Doc from javax. Initializes this The If this cipher requires any algorithm parameters that cannot be
derived from the given If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineSetMode | back to summary |
|---|---|
| protected void engineSetMode(String mode) throws NoSuchAlgorithmException Overrides com. Doc from javax. Sets the mode of this cipher.
| |
| engineSetPadding | back to summary |
|---|---|
| protected void engineSetPadding(String paddingScheme) throws NoSuchPaddingException Overrides com. Doc from javax. Sets the padding mechanism of this cipher.
| |
| Access | Constructor and Description |
|---|---|
| public |
| PBEWithSHA1AndRC4_128 | back to summary |
|---|---|
| public PBEWithSHA1AndRC4_128() throws NoSuchAlgorithmException | |
| Access | Constructor and Description |
|---|---|
| public |
| PBEWithSHA1AndRC4_40 | back to summary |
|---|---|
| public PBEWithSHA1AndRC4_40() throws NoSuchAlgorithmException | |