com.aliyun.oss.crypto

## 类 KmsEncryptionMaterials

- java.lang.Object
- - com.aliyun.oss.crypto.KmsEncryptionMaterials

- 所有已实现的接口:
    EncryptionMaterials

      public class KmsEncryptionMaterials
      extends Object
      implements EncryptionMaterials

  This provide a kms encryption materials for client-side encryption.

- - ### 构造器概要

    构造器
    构造器和说明
    `KmsEncryptionMaterials(String region, String cmk)`
    `KmsEncryptionMaterials(String region, String cmk, Map<String,String> desc)`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addKmsDescMaterial(String region, CredentialsProvider credentialsProvider, Map<String,String> description)` Add other kms region credentialsProvider and descrption materials used for decryption.
    `void` | `addKmsDescMaterial(String region, Map<String,String> description)` Add other kms region and descrption materials used for decryption.
    `void` | `decryptCEK(ContentCryptoMaterialRW contentMaterialRW)` Decrypt the encrypted content encryption key(cek) and encrypted iv and put the result into `ContentCryptoMaterialRW`.
    `void` | `encryptCEK(ContentCryptoMaterialRW contentMaterialRW)` Encrypt the content encryption key(cek) and iv, and put the result into `ContentCryptoMaterialRW`.
    `void` | `setKmsCredentialsProvider(CredentialsProvider credentialsProvider)` Sets the credentials provider.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### KmsEncryptionMaterials

          public KmsEncryptionMaterials(String region,
                                String cmk)

    - #### KmsEncryptionMaterials

          public KmsEncryptionMaterials(String region,
                                String cmk,
                                Map<String,String> desc)

  - ### 方法详细资料

    - #### setKmsCredentialsProvider

          public void setKmsCredentialsProvider(CredentialsProvider credentialsProvider)

      Sets the credentials provider.

    - #### addKmsDescMaterial

          public void addKmsDescMaterial(String region,
                                Map<String,String> description)

      Add other kms region and descrption materials used for decryption.
      参数:
        `region` - region.
        `description` - The descripton of encryption materails.

    - #### addKmsDescMaterial

          public void addKmsDescMaterial(String region,
                                CredentialsProvider credentialsProvider,
                                Map<String,String> description)

      Add other kms region credentialsProvider and descrption materials used for decryption.
      参数:
        `region` - region.
        `credentialsProvider` - The credential provider.
        `description` - The descripton of encryption materails.

    - #### encryptCEK

          public void encryptCEK(ContentCryptoMaterialRW contentMaterialRW)

      Encrypt the content encryption key(cek) and iv, and put the result into `ContentCryptoMaterialRW`.
      指定者:
        `encryptCEK` 在接口中 `EncryptionMaterials`
      参数:
        `contentMaterialRW` - The materials that contans all content crypto info, it must be constructed on outside and filled with the iv and cek. Then it will be builded with the encrypted cek ,encrypted iv, key wrap algorithm and encryption materials description by this method.

    - #### decryptCEK

          public void decryptCEK(ContentCryptoMaterialRW contentMaterialRW)

      Decrypt the encrypted content encryption key(cek) and encrypted iv and put the result into `ContentCryptoMaterialRW`.
      指定者:
        `decryptCEK` 在接口中 `EncryptionMaterials`
      参数:
        `contentMaterialRW` - The materials that contans all content crypto info, it must be constructed on outside and filled with the encrypted cek ,encrypted iv, key wrap algorithm, encryption materials description and cek generator algothrim. Then it will be builded with the cek iv parameters by this method.

Copyright © 2020. All Rights Reserved.