public class CryptoConfidentialKey extends ConfidentialKey
ConfidentialKey
that stores a SecretKey
for shared-secret cryptography (AES).Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_IV_LENGTH |
Constructor and Description |
---|
CryptoConfidentialKey(Class owner,
String shortName) |
CryptoConfidentialKey(String id) |
Modifier and Type | Method and Description |
---|---|
Cipher |
decrypt()
Deprecated.
use
decrypt(byte[]) |
Cipher |
decrypt(byte[] iv)
Returns a
Cipher object for decrypting with this key using the provided initialization vector. |
Cipher |
encrypt()
Deprecated.
use
encrypt(byte[]) |
Cipher |
encrypt(byte[] iv)
Returns a
Cipher 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.
|
getId, load, store
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final int DEFAULT_IV_LENGTH
public CryptoConfidentialKey(String id)
@Deprecated public Cipher encrypt()
encrypt(byte[])
Cipher
object for encrypting with this key.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Cipher encrypt(byte[] iv)
Cipher
object for encrypting with this key using the provided initialization vector.iv
- the initialization vector@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Cipher decrypt(byte[] iv)
Cipher
object for decrypting with this key using the provided initialization vector.iv
- the initialization vector@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public byte[] newIv(int length)
length
- the length of the saltencrypt(byte[])
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public byte[] newIv()
newIv(int)
,
encrypt(byte[])
@Deprecated public Cipher decrypt()
decrypt(byte[])
Cipher
object for decrypting with this key.Copyright © 2004–2021. All rights reserved.