Class UnwrapKeyResponseBody

  • All Implemented Interfaces:
    com.ibm.cloud.sdk.core.service.model.ObjectModel

    public class UnwrapKeyResponseBody
    extends com.ibm.cloud.sdk.core.service.model.GenericModel
    Properties that are associated with the response body of an unwrap action.
    • Method Detail

      • getPlaintext

        public String getPlaintext()
        Gets the plaintext. The data encryption key (DEK) used in wrap actions when the query parameter is set to `wrap`. The system returns a base64 encoded plaintext in the response entity-body when you perform an `unwrap` action on a key. To wrap an existing DEK, provide a base64 encoded plaintext during a `wrap` action. To generate a new DEK, omit the `plaintext` property. Key Protect generates a random plaintext (32 bytes) that is rooted in an HSM and then wraps that value. **Note:** When you unwrap a wrapped data encryption key (WDEK) by using a rotated root key, the service returns a new ciphertext in the response entity-body. Each ciphertext remains available for `unwrap` actions. If you unwrap a DEK with a previous ciphertext, the service also returns the latest ciphertext in the response. Use the latest ciphertext for future unwrap operations.
        Returns:
        the plaintext
      • getCiphertext

        public String getCiphertext()
        Gets the ciphertext. The wrapped data encryption key (WDEK) that you can export to your app or service. The ciphertext contains the DEK wrapped by the latest version of the key (WDEK). It is recommended to store and use this WDEK in future calls to Key Protect. The value is base64 encoded.
        Returns:
        the ciphertext
      • getKeyVersion

        public WrappedKeyVersionKeyVersion getKeyVersion()
        Gets the keyVersion. The key version that was used to wrap the DEK. This key version is associated with the `ciphertext` value that was used in the request.
        Returns:
        the keyVersion
      • getRewrappedKeyVersion

        public RewrappedKeyVersionRewrappedKeyVersion getRewrappedKeyVersion()
        Gets the rewrappedKeyVersion. The latest key version that was used to rewrap the DEK. This key version is associated with the `ciphertext` value that's returned in the response.
        Returns:
        the rewrappedKeyVersion