
AwsKmsKeyring_Compile.DecryptSingleEncryptedDataKey Maven / Gradle / Ivy
// Class DecryptSingleEncryptedDataKey
// Dafny class DecryptSingleEncryptedDataKey compiled into Java
package AwsKmsKeyring_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.*;
@SuppressWarnings({"unchecked", "deprecation"})
public class DecryptSingleEncryptedDataKey implements Actions_Compile.ActionWithResult, Actions_Compile.Action> {
public DecryptSingleEncryptedDataKey() {
this._materials = (software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials)null;
this._client = null;
this._awsKmsKey = dafny.DafnySequence. empty(dafny.TypeDescriptor.CHAR);
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 extends Character> awsKmsKey, dafny.DafnySequence extends dafny.DafnySequence extends Character>> grantTokens)
{
(this)._materials = materials;
(this)._client = client;
(this)._awsKmsKey = awsKmsKey;
(this)._grantTokens = grantTokens;
}
public Wrappers_Compile.Result Invoke(software.amazon.cryptography.materialproviders.internaldafny.types.EncryptedDataKey edk)
{
Wrappers_Compile.Result res = (Wrappers_Compile.Result)null;
KmsUnwrapKeyMaterial _0_kmsUnwrap;
KmsUnwrapKeyMaterial _nw0 = new KmsUnwrapKeyMaterial();
_nw0.__ctor((this).client(), (this).awsKmsKey(), (this).grantTokens());
_0_kmsUnwrap = _nw0;
Wrappers_Compile.Result, software.amazon.cryptography.materialproviders.internaldafny.types.Error> _1_unwrapOutputRes;
Wrappers_Compile.Result, software.amazon.cryptography.materialproviders.internaldafny.types.Error> _out0;
_out0 = EdkWrapping_Compile.__default.UnwrapEdkMaterial(KmsUnwrapInfo._typeDescriptor(), (edk).dtor_ciphertext(), (this).materials(), _0_kmsUnwrap);
_1_unwrapOutputRes = _out0;
Wrappers_Compile.Result, software.amazon.cryptography.materialproviders.internaldafny.types.Error> _2_valueOrError0 = Wrappers_Compile.Result., software.amazon.cryptography.materialproviders.internaldafny.types.Error>Default(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), EdkWrapping_Compile.UnwrapEdkMaterialOutput.Default(KmsUnwrapInfo._typeDescriptor(), KmsUnwrapInfo.Default()));
_2_valueOrError0 = _1_unwrapOutputRes;
if ((_2_valueOrError0).IsFailure(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor())) {
res = (_2_valueOrError0).PropagateFailure(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor(), Materials_Compile.SealedDecryptionMaterials._typeDescriptor());
return res;
}
EdkWrapping_Compile.UnwrapEdkMaterialOutput _3_unwrapOutput;
_3_unwrapOutput = (_2_valueOrError0).Extract(EdkWrapping_Compile.UnwrapEdkMaterialOutput._typeDescriptor(KmsUnwrapInfo._typeDescriptor()), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor());
Wrappers_Compile.Result _4_valueOrError1 = (Wrappers_Compile.Result)null;
_4_valueOrError1 = Materials_Compile.__default.DecryptionMaterialsAddDataKey((this).materials(), (_3_unwrapOutput).dtor_plaintextDataKey(), (_3_unwrapOutput).dtor_symmetricSigningKey());
if ((_4_valueOrError1).IsFailure(software.amazon.cryptography.materialproviders.internaldafny.types.DecryptionMaterials._typeDescriptor(), software.amazon.cryptography.materialproviders.internaldafny.types.Error._typeDescriptor())) {
res = (_4_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 _5_result;
_5_result = (_4_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(), _5_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 extends Character> _awsKmsKey;
public dafny.DafnySequence extends Character> awsKmsKey()
{
return this._awsKmsKey;
}
public dafny.DafnySequence extends dafny.DafnySequence extends Character>> _grantTokens;
public dafny.DafnySequence extends dafny.DafnySequence extends Character>> grantTokens()
{
return this._grantTokens;
}
private static final dafny.TypeDescriptor _TYPE = dafny.TypeDescriptor.referenceWithInitializer(DecryptSingleEncryptedDataKey.class, () -> (DecryptSingleEncryptedDataKey) null);
public static dafny.TypeDescriptor _typeDescriptor() {
return (dafny.TypeDescriptor) (dafny.TypeDescriptor>) _TYPE;
}
@Override
public java.lang.String toString() {
return "AwsKmsKeyring.DecryptSingleEncryptedDataKey";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy