All Downloads are FREE. Search and download functionalities are using the official Maven repository.

AwsKmsRsaKeyring_Compile.DecryptSingleAWSRSAEncryptedDataKey Maven / Gradle / Ivy

// Class DecryptSingleAWSRSAEncryptedDataKey
// Dafny class DecryptSingleAWSRSAEncryptedDataKey compiled into Java
package AwsKmsRsaKeyring_Compile;

import software.amazon.cryptography.keystore.internaldafny.types.*;
import software.amazon.cryptography.materialproviders.internaldafny.types.*;
import AwsArnParsing_Compile.*;
import AwsKmsMrkMatchForDecrypt_Compile.*;
import AwsKmsUtils_Compile.*;
import KeyStoreErrorMessages_Compile.*;
import KmsArn_Compile.*;
import Structure_Compile.*;
import KMSKeystoreOperations_Compile.*;
import DDBKeystoreOperations_Compile.*;
import CreateKeys_Compile.*;
import CreateKeyStoreTable_Compile.*;
import GetKeys_Compile.*;
import AwsCryptographyKeyStoreOperations_Compile.*;
import software.amazon.cryptography.keystore.internaldafny.*;
import AlgorithmSuites_Compile.*;
import Materials_Compile.*;
import Keyring_Compile.*;
import MultiKeyring_Compile.*;
import AwsKmsMrkAreUnique_Compile.*;
import Constants_Compile.*;
import MaterialWrapping_Compile.*;
import CanonicalEncryptionContext_Compile.*;
import IntermediateKeyWrapping_Compile.*;
import EdkWrapping_Compile.*;
import ErrorMessages_Compile.*;
import AwsKmsKeyring_Compile.*;
import StrictMultiKeyring_Compile.*;
import AwsKmsDiscoveryKeyring_Compile.*;
import DiscoveryMultiKeyring_Compile.*;
import AwsKmsMrkDiscoveryKeyring_Compile.*;
import MrkAwareDiscoveryMultiKeyring_Compile.*;
import AwsKmsMrkKeyring_Compile.*;
import MrkAwareStrictMultiKeyring_Compile.*;
import LocalCMC_Compile.*;
import StormTracker_Compile.*;
import software.amazon.cryptography.internaldafny.StormTrackingCMC.*;
import CacheConstants_Compile.*;
import AwsKmsHierarchicalKeyring_Compile.*;

@SuppressWarnings({"unchecked", "deprecation"})
public class DecryptSingleAWSRSAEncryptedDataKey implements Actions_Compile.ActionWithResult, Actions_Compile.Action> {
  public DecryptSingleAWSRSAEncryptedDataKey() {
    this._materials = (software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials)null;
    this._client = null;
    this._awsKmsKey = dafny.DafnySequence. empty(dafny.TypeDescriptor.CHAR);
    this._paddingScheme = software.amazon.cryptography.services.kms.internaldafny.types.EncryptionAlgorithmSpec.Default();
    this._encryptionContextDigest = dafny.DafnySequence. empty(BoundedInts_Compile.uint8._typeDescriptor());
    this._grantTokens = dafny.DafnySequence.> empty(software.amazon.cryptography.services.kms.internaldafny.types.GrantTokenType._typeDescriptor());
  }
  public void __ctor(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials materials, software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient client, dafny.DafnySequence awsKmsKey, software.amazon.cryptography.services.kms.internaldafny.types.EncryptionAlgorithmSpec paddingScheme, dafny.DafnySequence encryptionContextDigest, dafny.DafnySequence> grantTokens)
  {
    (this)._materials = materials;
    (this)._client = client;
    (this)._awsKmsKey = awsKmsKey;
    (this)._paddingScheme = paddingScheme;
    (this)._encryptionContextDigest = encryptionContextDigest;
    (this)._grantTokens = grantTokens;
  }
  public Wrappers_Compile.Result Invoke(software.amazon.cryptography.materialproviders.internaldafny.types.EncryptedDataKey edk)
  {
    Wrappers_Compile.Result res = (Wrappers_Compile.Result)null;
    KmsRsaUnwrapKeyMaterial _0_unwrap;
    KmsRsaUnwrapKeyMaterial _nw0 = new KmsRsaUnwrapKeyMaterial();
    _nw0.__ctor((this).client(), (this).awsKmsKey(), (this).paddingScheme(), (this).encryptionContextDigest(), (this).grantTokens());
    _0_unwrap = _nw0;
    Wrappers_Compile.Result, software.amazon.cryptography.materialproviders.internaldafny.types.Error> _1_valueOrError0 = Wrappers_Compile.Result., software.amazon.cryptography.materialproviders.internaldafny.types.Error>Default(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsRsaUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), EdkWrapping_Compile.UnwrapEdkMaterialOutput.Default(KmsRsaUnwrapInfo._typeDescriptor(), KmsRsaUnwrapInfo.Default()));
    Wrappers_Compile.Result, software.amazon.cryptography.materialproviders.internaldafny.types.Error> _out0;
    _out0 = EdkWrapping_Compile.__default.UnwrapEdkMaterial(KmsRsaUnwrapInfo._typeDescriptor(), (edk).dtor_ciphertext(), (this).materials(), _0_unwrap);
    _1_valueOrError0 = _out0;
    if ((_1_valueOrError0).IsFailure(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsRsaUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor())) {
      res = (_1_valueOrError0).PropagateFailure(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsRsaUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), Materials_Compile.SealedDecryptionMaterials._typeDescriptor());
      return res;
    }
    EdkWrapping_Compile.UnwrapEdkMaterialOutput _2_unwrapOutput;
    _2_unwrapOutput = (_1_valueOrError0).Extract(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsRsaUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor());
    Wrappers_Compile.Result _3_valueOrError1 = (Wrappers_Compile.Result)null;
    _3_valueOrError1 = Materials_Compile.__default.DecryptionMaterialsAddDataKey((this).materials(), (_2_unwrapOutput).dtor_plaintextDataKey(), (_2_unwrapOutput).dtor_symmetricSigningKey());
    if ((_3_valueOrError1).IsFailure(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials._typeDescriptor(), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor())) {
      res = (_3_valueOrError1).PropagateFailure(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials._typeDescriptor(), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), Materials_Compile.SealedDecryptionMaterials._typeDescriptor());
      return res;
    }
    software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials _4_result;
    _4_result = (_3_valueOrError1).Extract(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials._typeDescriptor(), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor());
    res = Wrappers_Compile.Result.create_Success(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials._typeDescriptor(), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), _4_result);
    return res;
  }
  public software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials _materials;
  public software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials materials()
  {
    return this._materials;
  }
  public software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient _client;
  public software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient client()
  {
    return this._client;
  }
  public dafny.DafnySequence _awsKmsKey;
  public dafny.DafnySequence awsKmsKey()
  {
    return this._awsKmsKey;
  }
  public software.amazon.cryptography.services.kms.internaldafny.types.EncryptionAlgorithmSpec _paddingScheme;
  public software.amazon.cryptography.services.kms.internaldafny.types.EncryptionAlgorithmSpec paddingScheme()
  {
    return this._paddingScheme;
  }
  public dafny.DafnySequence _encryptionContextDigest;
  public dafny.DafnySequence encryptionContextDigest()
  {
    return this._encryptionContextDigest;
  }
  public dafny.DafnySequence> _grantTokens;
  public dafny.DafnySequence> grantTokens()
  {
    return this._grantTokens;
  }
  private static final dafny.TypeDescriptor _TYPE = dafny.TypeDescriptor.referenceWithInitializer(DecryptSingleAWSRSAEncryptedDataKey.class, () -> (DecryptSingleAWSRSAEncryptedDataKey) null);
  public static dafny.TypeDescriptor _typeDescriptor() {
    return (dafny.TypeDescriptor) (dafny.TypeDescriptor) _TYPE;
  }
  @Override
  public java.lang.String toString() {
    return "AwsKmsRsaKeyring.DecryptSingleAWSRSAEncryptedDataKey";
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy