public static final class CertificatePublicKeyEncryptRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CertificatePublicKeyEncryptRequest.Builder |
algorithm(String algorithm)
The encryption algorithm.
|
CertificatePublicKeyEncryptRequest |
build() |
CertificatePublicKeyEncryptRequest.Builder |
certificateId(String certificateId)
The ID of the certificate.
|
CertificatePublicKeyEncryptRequest.Builder |
plaintext(String plaintext)
The data that you want to encrypt.
|
public CertificatePublicKeyEncryptRequest.Builder algorithm(String algorithm)
* RSAES_OAEP_SHA\_1 * RSAES_OAEP_SHA\_256 * SM2PKE >The SM2PKE encryption algorithm is supported only in regions in mainland China. In these regions, managed hardware security modules (HSMs) are used. For more information, see [Managed HSM overview](~~125803~~).
public CertificatePublicKeyEncryptRequest.Builder certificateId(String certificateId)
public CertificatePublicKeyEncryptRequest.Builder plaintext(String plaintext)
The value is encoded in Base64. For example, if the hexadecimal data that you want to encrypt is `[0x31, 0x32, 0x33, 0x34]`, the Base64-encoded data is `MTIzNA==`. The size of data that can be encrypted varies based on the encryption algorithm that you use: * RSAES_OAEP_SHA\_1: 214 bytes * RSAES_OAEP_SHA\_256: 190 bytes * SM2PKE: 6,047 bytes If the size of data that you want to encrypt exceeds the preceding limits, you can call the [GenerateDataKey](~~28948~~) operation to generate a data key to encrypt the data. Then, call the CertificatePublicKeyEncrypt operation to encrypt the data key.
public CertificatePublicKeyEncryptRequest build()
Copyright © 2023. All rights reserved.