Skip to content

Commit 7ab9b08

Browse files
committed
m
1 parent 02d7b0a commit 7ab9b08

File tree

9 files changed

+168
-123
lines changed

9 files changed

+168
-123
lines changed

DynamoDbEncryption/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ ImplementationFromDafny.cs
33
TestsFromDafny.cs
44
ImplementationFromDafny-cs.dtr
55
TestsFromDafny-cs.dtr
6-
**/bin
76
**/obj
87
node_modules
98
project.properties

DynamoDbEncryption/runtimes/rust/src/bin/example/basic_get_put_example.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
13

4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
27

38
use std::collections::HashMap;
49
use crate::test_utils;
@@ -158,6 +163,6 @@ pub async fn put_item_get_item()
158163
.unwrap();
159164

160165
assert_eq!(resp.item, Some(item));
161-
println!("put_item_get_item Successful.");
166+
println!("put_item_get_item successful.");
162167
}
163168

DynamoDbEncryption/runtimes/rust/src/bin/example/itemencryptor/item_encrypt_decrypt.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
7+
18
use std::collections::HashMap;
29
use crate::test_utils;
310
use aws_sdk_dynamodb::types::AttributeValue;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
7+
18
pub mod item_encrypt_decrypt;

DynamoDbEncryption/runtimes/rust/src/bin/example/main.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
17

28
pub mod basic_get_put_example;
39
pub mod test_utils;
410
pub mod itemencryptor;
511
pub mod searchableencryption;
12+
pub mod create_keystore_key;
613

714
#[tokio::main]
815
pub async fn main() {
916
basic_get_put_example::put_item_get_item().await;
1017
itemencryptor::item_encrypt_decrypt::encrypt_decrypt().await;
11-
/*
18+
19+
let key_id = create_keystore_key::keystore_create_key().await;
20+
// let key_id2 = create_keystore_key::keystore_create_key().await;
21+
// Key creation is eventually consistent, so wait 5 seconds to decrease the likelihood
22+
// our test fails due to eventual consistency issues.
23+
std::thread::sleep(std::time::Duration::from_secs(5));
24+
25+
searchableencryption::basic_searchable_encryption::put_and_query_with_beacon(&key_id).await;
26+
/*
1227
1328
await ScanErrorExample.ScanError();
1429
await GetEncryptedDataKeyDescriptionExample.GetEncryptedDataKeyDescription();
@@ -21,15 +36,8 @@ pub async fn main() {
2136
await RawRsaKeyringExample.RawRsaKeyringGetItemPutItem();
2237
await KmsRsaKeyringExample.KmsRsaKeyringGetItemPutItem();
2338
24-
var keyId = CreateKeyStoreKeyExample.KeyStoreCreateKey();
25-
var keyId2 = CreateKeyStoreKeyExample.KeyStoreCreateKey();
26-
// Key creation is eventually consistent, so wait 5 seconds to decrease the likelihood
27-
// our test fails due to eventual consistency issues.
28-
Thread.Sleep(5000);
2939
3040
await HierarchicalKeyringExample.HierarchicalKeyringGetItemPutItem(keyId, keyId2);
31-
32-
await BasicSearchableEncryptionExample.PutItemQueryItemWithBeacon(keyId);
3341
await CompoundBeaconSearchableEncryptionExample.PutItemQueryItemWithCompoundBeacon(keyId);
3442
await VirtualBeaconSearchableEncryptionExample.PutItemQueryItemWithVirtualBeacon(keyId);
3543
await BeaconStylesSearchableEncryptionExample.PutItemQueryItemWithBeaconStyles(keyId);

DynamoDbEncryption/runtimes/rust/src/bin/example/searchableencryption/basic_searchable_encryption.rs

Lines changed: 117 additions & 112 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
7+
18
pub mod basic_searchable_encryption;

DynamoDbEncryption/runtimes/rust/src/bin/example/test_utils.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#![deny(warnings, unconditional_panic)]
5+
#![deny(nonstandard_style)]
6+
#![deny(clippy::all)]
7+
18
pub const TEST_KEYSTORE_NAME : &str = "KeyStoreDdbTable";
29
pub const TEST_LOGICAL_KEYSTORE_NAME : &str = "KeyStoreDdbTable";
310

submodules/smithy-dafny

0 commit comments

Comments
 (0)