Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8897cd0
Added method to DaprClient and GRPC implementation to call cryptograp…
WhitWaldo Dec 20, 2023
b98926e
First pass at implementing all exposed Cryptography methods on Go int…
WhitWaldo Dec 22, 2023
e391735
Added examples for Cryptography block
WhitWaldo Dec 22, 2023
43dd902
Added missing copyright statements
WhitWaldo Dec 22, 2023
9c5ef09
Updated to properly support Crypto API this time
WhitWaldo Dec 22, 2023
14f23df
Added copyright statements
WhitWaldo Dec 22, 2023
dee30d1
Removed deprecated examples as the subtle APIs are presently disabled
WhitWaldo Dec 22, 2023
37640bb
Updated example to reflect new API shape
WhitWaldo Dec 22, 2023
c398780
Updated example and readme
WhitWaldo Dec 23, 2023
6e93dd5
Added overloads for encrypting/decrypting streams instead of just fix…
WhitWaldo Dec 23, 2023
2913fcf
Added some unit tests to pair with the implementation
WhitWaldo Dec 23, 2023
89dfda3
Added null check for the stream argument
WhitWaldo Jan 2, 2024
3f5a489
Changed case of the arguments as they should read "plaintext" and not…
WhitWaldo Jan 2, 2024
f706227
Reduced number of encryption implementations by just wrapping byte ar…
WhitWaldo Jan 2, 2024
735b079
Constrainted returned member types per review suggestion
WhitWaldo Jan 2, 2024
38b9e04
Updated methods to use ReadOnlyMemory<byte> instead of byte[] - updat…
WhitWaldo Jan 3, 2024
8a80a86
Updated to use encryption/decryption options instead of lots of metho…
WhitWaldo Jan 3, 2024
337961e
Updated tests
WhitWaldo Jan 3, 2024
a75603f
Removed unused reference
WhitWaldo Jan 3, 2024
86315b4
Updated examples to reflect new method shapes. Downgraded package to …
WhitWaldo Jan 3, 2024
c2e59bc
Updated to reflect non-aliased values per review suggestion
WhitWaldo Jan 3, 2024
bdc7ffd
Update to ensure that both send/receive streams run at the same time …
WhitWaldo Jan 3, 2024
705cf77
Updated to support streamed results in addition to fixed byte arrays.…
WhitWaldo Jan 3, 2024
6b6d709
Updated example to fix compile issue
WhitWaldo Jan 3, 2024
3c0bcdc
Removed encrypt/decrypt methods that accepted streams and returned Re…
WhitWaldo Jan 3, 2024
ba61812
Added missing Obsolete attributes on Encrypt/Decrypt methods. Added o…
WhitWaldo Jan 3, 2024
1d0764b
Updated encrypt/decrypt options so the streaming block size no longer…
WhitWaldo Jan 3, 2024
6e827e1
Updated how validation works in the options to accommodate lack of th…
WhitWaldo Jan 3, 2024
ea3992a
Updated names of encrypt/decrypt streaming methods so everything uses…
WhitWaldo Jan 3, 2024
50bf981
Fixed regression that would have prevented data from being sent entir…
WhitWaldo Jan 3, 2024
0c25a56
Updated examples to reflect changed API
WhitWaldo Jan 3, 2024
5bb55fe
Updated so IAsyncEnumerable methods (encrypt and decrypt) return IAsy…
WhitWaldo Jan 3, 2024
4ed3562
Updated example to reflect change from IAsyncEnumerable<byte> to IAsy…
WhitWaldo Jan 3, 2024
878b8e7
Avoiding allocation by using MemoryMarshal instead of .ToArray() to c…
WhitWaldo Jan 3, 2024
7c83888
Performance updates to minimize unnecessary byte array copies and eli…
WhitWaldo Jan 4, 2024
17bf79f
Removed unnecessary return from SendPlaintextStreamAsync and SendCiph…
WhitWaldo Jan 4, 2024
770b94a
Updated exception text to be more specific as to what's wrong with th…
WhitWaldo Jan 4, 2024
d5bcebb
Minor tweak to prefer using using a Memory
WhitWaldo Jan 4, 2024
095405e
Deduplicated some of the Decrypt methods, simplifying the implementation
WhitWaldo Jan 4, 2024
27366a4
Eliminated duplicate encryption method, simplifying implementation
WhitWaldo Jan 4, 2024
ff670ee
Updated to eliminate an unnecessary `await` and `async foreach`.
WhitWaldo Jan 4, 2024
05ebc8e
Updated stream example to reflect the changes to the API shape
WhitWaldo Jan 4, 2024
48bd541
Added notes about operations with stream-based data
WhitWaldo Jan 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated how validation works in the options to accommodate lack of th…
…e shorter variation in .NET 6

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
  • Loading branch information
WhitWaldo committed Feb 1, 2024
commit 6e827e10d1cefa0f91a48e390a9114851c0aa590
11 changes: 9 additions & 2 deletions src/Dapr.Client/CryptographyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ public int StreamingBlockSizeInBytes
get => streamingBlockSizeInBytes;
set
{
ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(value, 0, nameof(value));
if (value <= 0)
{
throw new ArgumentOutOfRangeException(nameof(value));
}

streamingBlockSizeInBytes = value;
}
}
Expand Down Expand Up @@ -64,7 +68,10 @@ public int StreamingBlockSizeInBytes
get => streamingBlockSizeInBytes;
set
{
ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(value, 0, nameof(value));
if (value <= 0)
{
throw new ArgumentOutOfRangeException(nameof(value));
}

streamingBlockSizeInBytes = value;
}
Expand Down