Package jenkins.security
Class CryptoConfidentialKey
java.lang.Object
jenkins.security.ConfidentialKey
jenkins.security.CryptoConfidentialKey
ConfidentialKey
that stores a SecretKey
for shared-secret cryptography (AES).- Since:
- 1.498
- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecrypt()
Deprecated.decrypt
(byte[] iv) Returns aCipher
object for decrypting with this key using the provided initialization vector.encrypt()
Deprecated.useencrypt(byte[])
encrypt
(byte[] iv) Returns aCipher
object for encrypting with this key using the provided initialization vector.byte[]
newIv()
Generates a new Initialization Vector of default length.byte[]
newIv
(int length) Generates a new Initialization Vector.Methods inherited from class jenkins.security.ConfidentialKey
getId, load, store
-
Field Details
-
DEFAULT_IV_LENGTH
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final int DEFAULT_IV_LENGTH- See Also:
-
-
Constructor Details
-
CryptoConfidentialKey
-
CryptoConfidentialKey
-
-
Method Details
-
encrypt
Deprecated.useencrypt(byte[])
Returns aCipher
object for encrypting with this key. -
encrypt
Returns aCipher
object for encrypting with this key using the provided initialization vector.- Parameters:
iv
- the initialization vector- Returns:
- the cipher
-
decrypt
Returns aCipher
object for decrypting with this key using the provided initialization vector.- Parameters:
iv
- the initialization vector- Returns:
- the cipher
-
newIv
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public byte[] newIv(int length) Generates a new Initialization Vector.- Parameters:
length
- the length of the salt- Returns:
- some random bytes
- See Also:
-
newIv
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public byte[] newIv()Generates a new Initialization Vector of default length.- Returns:
- some random bytes
- See Also:
-
decrypt
Deprecated.usedecrypt(byte[])
Returns aCipher
object for decrypting with this key.
-
decrypt(byte[])