-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathInternalLegacyConfig.cs
73 lines (66 loc) · 2.5 KB
/
InternalLegacyConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
using software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.types;
namespace software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.internaldafny.legacy
{
public partial class InternalLegacyOverride
{
public software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ILegacyPolicy _policy
{
get => software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.LegacyPolicy.create_FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT();
set { }
}
public software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ILegacyPolicy policy
{
get
{
return this._policy;
}
}
public static Wrappers_Compile._IResult<
Wrappers_Compile._IOption<InternalLegacyOverride>,
_IError
> Build(_IDynamoDbItemEncryptorConfig config)
{
if (config.dtor_legacyOverride.is_None)
{
return Wrappers_Compile
.Result<Wrappers_Compile._IOption<InternalLegacyOverride>, _IError>
.create_Success(Wrappers_Compile.Option<InternalLegacyOverride>.create_None());
}
// .Net does not support the Legacy DDB-EC
var ex = new Error_DynamoDbItemEncryptorException(
Dafny.Sequence<char>.FromString("Legacy configuration unsupported."));
return Wrappers_Compile
.Result<Wrappers_Compile._IOption<InternalLegacyOverride>, _IError>
.create_Failure(ex);
}
public Wrappers_Compile._IResult<
_IEncryptItemOutput,
_IError
> EncryptItem(_IEncryptItemInput input)
{
// .Net does not support the Legacy DDB-EC
var ex = new Error_DynamoDbItemEncryptorException(
Dafny.Sequence<char>.FromString("Legacy configuration unsupported."));
return Wrappers_Compile.Result<_IEncryptItemOutput, _IError>
.create_Failure(ex);
}
public Wrappers_Compile._IResult<
_IDecryptItemOutput,
_IError
> DecryptItem(_IDecryptItemInput input)
{
// .Net does not support the Legacy DDB-EC
var ex = new Error_DynamoDbItemEncryptorException(
Dafny.Sequence<char>.FromString("Legacy configuration unsupported."));
return Wrappers_Compile.Result<_IDecryptItemOutput, _IError>
.create_Failure(ex);
}
public bool IsLegacyInput(_IDecryptItemInput input)
{
// .Net does not support the Legacy DDB-EC
return false;
}
}
}