Skip to content

Commit

Permalink
Update to .NET 8 (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz authored Jun 11, 2024
1 parent 49ced3d commit 1b00616
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7
dotnet-version: 8

- name: Build
run: dotnet build
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/temporalio/samples-dotnet</RepositoryUrl>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.1.0</Version>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the set of .NET samples for the [.NET SDK](https://github.com/temporalio

Prerequisites:

* .NET >= 6
* .NET 8
* [Local Temporal server running](https://docs.temporal.io/application-development/foundations#run-a-development-cluster)

## Samples
Expand Down
4 changes: 2 additions & 2 deletions src/Encryption/Codec/EncryptionCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private byte[] Encrypt(byte[] data)
RandomNumberGenerator.Fill(nonceSpan);

// Perform encryption
using (var aes = new AesGcm(key))
using (var aes = new AesGcm(key, TagSize))
{
aes.Encrypt(nonceSpan, data, bytes.AsSpan(NonceSize + TagSize), bytes.AsSpan(NonceSize, TagSize));
return bytes;
Expand All @@ -82,7 +82,7 @@ private byte[] Decrypt(byte[] data)
{
var bytes = new byte[data.Length - NonceSize - TagSize];

using (var aes = new AesGcm(key))
using (var aes = new AesGcm(key, TagSize))
{
aes.Decrypt(
data.AsSpan(0, NonceSize), data.AsSpan(NonceSize + TagSize), data.AsSpan(NonceSize, TagSize), bytes.AsSpan());
Expand Down
2 changes: 1 addition & 1 deletion src/WorkerSpecificTaskQueues/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async Task RunWorkerAsync()
{
try
{
tokenSource.Cancel();
await tokenSource.CancelAsync();
await Task.WhenAll(tasks);
}
catch (Exception ex)
Expand Down

0 comments on commit 1b00616

Please sign in to comment.