Skip to content

Commit

Permalink
chore: Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed Oct 1, 2024
1 parent 552a5d6 commit eae011b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/SvR.ContentPrep/Encryptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ internal static async Task<FileEncryptionInfo> EncryptFileAsync(string file, Can
// byte[] encryptionKey = CreateAesKey();
// byte[] hmacKey = CreateAesKey();
// byte[] iv = GenerateAesIV();

// cancellationToken.ThrowIfCancellationRequested();
// byte[] encryptedFileHash = await EncryptFileWithIVAsync(file, fileWithGuid, encryptionKey, hmacKey, iv, cancellationToken);

Expand Down Expand Up @@ -155,10 +155,12 @@ private static async Task<byte[]> EncryptStreamWithIVAsync(
{
throw new ArgumentNullException(nameof(targetStream));
}
if (sourceStream.CanRead == false) {
if (sourceStream.CanRead == false)
{
throw new ArgumentException("The source stream must be readable", nameof(sourceStream));
}
if (targetStream.CanWrite == false || targetStream.CanSeek == false || targetStream.CanRead == false) {
if (targetStream.CanWrite == false || targetStream.CanSeek == false || targetStream.CanRead == false)
{
throw new ArgumentException("The target stream must support Read, Write and Seek", nameof(targetStream));
}
byte[]? encryptedFileHash;
Expand Down
2 changes: 1 addition & 1 deletion src/SvR.ContentPrep/Packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public Packager(ILogger<Packager>? logger = null)
applicationInfo.SetupFile = applicationDetails.SetupFile!;
applicationInfo.EncryptionInfo = await Encryptor.EncryptStreamToStreamAsync(streamWithZippedSetupFiles, outputStream, cancellationToken);

return applicationInfo;
return applicationInfo;
}

/// <summary>
Expand Down

0 comments on commit eae011b

Please sign in to comment.