File tree Expand file tree Collapse file tree 4 files changed +18
-19
lines changed
WrappedDynamoDbItemEncryptor/src Expand file tree Collapse file tree 4 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 44include "LibraryIndex. dfy"
55include "TestVectors. dfy"
66include "WriteSetPermutations. dfy"
7+ include ".. / .. / WrappedDynamoDbItemEncryptor/ src/ Index. dfy"
78
89module WrappedDDBEncryptionMain {
910 import opened Wrappers
@@ -16,6 +17,7 @@ module WrappedDDBEncryptionMain {
1617 import opened JSONHelpers
1718 import KeyVectors
1819 import KeyVectorsTypes = AwsCryptographyMaterialProvidersTestVectorKeysTypes
20+ import WrappedItemEncryptor
1921
2022
2123 const DEFAULT_KEYS : string := ".. / .. / .. / submodules/ MaterialProviders/ TestVectorsAwsCryptographicMaterialProviders/ dafny/ TestVectorsAwsCryptographicMaterialProviders/ test/ keys. json"
Original file line number Diff line number Diff line change 33// Empty stub expected by Smithy-Dafny
44
55include ".. / .. / .. / .. / DynamoDbEncryption/ dafny/ DynamoDbItemEncryptor/ src/ Index. dfy"
6- module {:extern "software. amazon. cryptography. dbencryptionsdk. dynamodb. itemencryptor. internaldafny. wrapped" } WrappedItemEncryptor refines WrappedAbstractAwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorService {}
6+ include ".. / Model/ AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypesWrapped. dfy"
7+ module {:extern "software. amazon. cryptography. dbencryptionsdk. dynamodb. itemencryptor. internaldafny. wrapped" } WrappedItemEncryptor refines WrappedAbstractAwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorService {
8+
9+ import ComAmazonawsDynamodbTypes
10+
11+ import DynamoDbItemEncryptor
12+
13+ function method WrappedDefaultDynamoDbItemEncryptorConfig (): DynamoDbItemEncryptorConfig
14+ {
15+ DynamoDbItemEncryptor. DefaultDynamoDbItemEncryptorConfig ()
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -18,20 +18,7 @@ impl _CreateWrappedItemEncryptor_Compile::_default {
1818 pub fn CreateWrappedItemEncryptor (
1919 config : & Rc < crate :: implementation_from_dafny:: software:: amazon:: cryptography:: dbencryptionsdk:: dynamodb:: itemencryptor:: internaldafny:: types:: DynamoDbItemEncryptorConfig >
2020 ) -> Rc < _Wrappers_Compile:: Result < Object < dyn IDynamoDbItemEncryptorClient > , Rc < Error > > > {
21- let native_config = crate :: deps:: aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor:: conversions:: dynamo_db_item_encryptor_config:: _dynamo_db_item_encryptor_config:: plain_from_dafny ( config) ;
22-
23- let item_encryptor = match item_encryptor_client:: Client :: from_conf ( native_config) {
24- Ok ( client) => client,
25- Err ( e) => return Rc :: new ( crate :: r#_Wrappers_Compile:: Result :: Failure {
26- error : error:: to_dafny ( e) ,
27- } ) ,
28- } ;
29-
30- let wrapped_encryptor = wrapped_item_encryptor_client:: Client { wrapped : item_encryptor} ;
31- let dafny_encryptor = :: dafny_runtime:: upcast_object ( ) ( :: dafny_runtime:: object:: new ( wrapped_encryptor) ) ;
32-
33- Rc :: new ( crate :: r#_Wrappers_Compile:: Result :: Success {
34- value : dafny_encryptor,
35- } )
21+ // from_conf converts Dafny config to native, constructs a native client, and wraps it in a Dafny client
22+ return wrapped_item_encryptor_client:: Client :: from_conf ( config) ;
3623 }
3724}
Original file line number Diff line number Diff line change @@ -14,15 +14,14 @@ pub mod operation;
1414pub mod types;
1515pub mod validation;
1616pub mod intercept;
17-
18- // removed wrapped-client feature using sed;
19- // removed wrapped module using sed;
17+ pub mod wrapped;
2018
2119mod standard_library_conversions;
2220mod standard_library_externs;
2321
2422pub use client:: Client ;
2523
24+ pub use crate :: deps:: aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor;
2625pub use crate :: deps:: aws_cryptography_dbEncryptionSdk_structuredEncryption;
2726pub use crate :: deps:: aws_cryptography_keyStore;
2827pub use crate :: deps:: aws_cryptography_materialProviders;
You can’t perform that action at this time.
0 commit comments