public class EncryptParameters extends Object
Modifier and Type | Method and Description |
---|---|
static EncryptParameters |
createA128CbcPadParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128CBCPAD . |
static EncryptParameters |
createA128CbcPadParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128CBCPAD . |
static EncryptParameters |
createA128CbcParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128CBC . |
static EncryptParameters |
createA128CbcParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128CBC . |
static EncryptParameters |
createA128GcmParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128GCM . |
static EncryptParameters |
createA128GcmParameters(byte[] plaintext,
byte[] additionalAuthenticatedData)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A128GCM . |
static EncryptParameters |
createA192CbcPadParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192CBCPAD . |
static EncryptParameters |
createA192CbcPadParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192CBCPAD . |
static EncryptParameters |
createA192CbcParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192CBC . |
static EncryptParameters |
createA192CbcParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192CBC . |
static EncryptParameters |
createA192GcmParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192GCM . |
static EncryptParameters |
createA192GcmParameters(byte[] plaintext,
byte[] additionalAuthenticatedData)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A192GCM . |
static EncryptParameters |
createA256CbcPadParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256CBCPAD . |
static EncryptParameters |
createA256CbcPadParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256CBCPAD . |
static EncryptParameters |
createA256CbcParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256CBC . |
static EncryptParameters |
createA256CbcParameters(byte[] plaintext,
byte[] iv)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256CBC . |
static EncryptParameters |
createA256GcmParameters(byte[] plaintext)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256GCM . |
static EncryptParameters |
createA256GcmParameters(byte[] plaintext,
byte[] additionalAuthenticatedData)
Factory method to create an instance of
EncryptParameters with the given parameters for
EncryptionAlgorithm.A256GCM . |
byte[] |
getAdditionalAuthenticatedData()
Get additional data to authenticate when performing encryption with an authenticated algorithm.
|
EncryptionAlgorithm |
getAlgorithm()
The algorithm to be used for encryption.
|
byte[] |
getIv()
Get the initialization vector to be used in the encryption operation using a symmetric algorithm.
|
byte[] |
getPlainText()
Get the content to be encrypted.
|
public static EncryptParameters createA128CbcParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128CBC
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA128CbcParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128CBC
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA128CbcPadParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128CBCPAD
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA128CbcPadParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128CBCPAD
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA128GcmParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128GCM
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA128GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A128GCM
.plaintext
- The content to be encryption.additionalAuthenticatedData
- Additional data to authenticate when using authenticated crypto algorithms.EncryptParameters
.public static EncryptParameters createA192CbcParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192CBC
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA192CbcParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192CBC
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA192CbcPadParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192CBCPAD
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA192CbcPadParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192CBCPAD
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA192GcmParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192GCM
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA192GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A192GCM
.plaintext
- The content to be encryption.additionalAuthenticatedData
- Additional data to authenticate when using authenticated crypto algorithms.EncryptParameters
.public static EncryptParameters createA256CbcParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256CBC
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA256CbcParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256CBC
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA256CbcPadParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256CBCPAD
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA256CbcPadParameters(byte[] plaintext, byte[] iv)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256CBCPAD
.plaintext
- The content to be encryption.iv
- Initialization vector for the encryption operation.EncryptParameters
.public static EncryptParameters createA256GcmParameters(byte[] plaintext)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256GCM
.plaintext
- The content to be encryption.EncryptParameters
.public static EncryptParameters createA256GcmParameters(byte[] plaintext, byte[] additionalAuthenticatedData)
EncryptParameters
with the given parameters for
EncryptionAlgorithm.A256GCM
.plaintext
- The content to be encryption.additionalAuthenticatedData
- Additional data to authenticate when using authenticated crypto algorithms.EncryptParameters
.public EncryptionAlgorithm getAlgorithm()
public byte[] getPlainText()
public byte[] getIv()
public byte[] getAdditionalAuthenticatedData()
Copyright © 2021 Microsoft Corporation. All rights reserved.