Skip to content

Commit

Permalink
Fix LoadInto error for encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanbayatme committed May 12, 2022
1 parent 835a1bc commit 5a61470
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Assets/Plugins/Bayat/SaveSystem/Runtime/PluginVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class PluginVersion
/// <summary>
/// The plugin's version.
/// </summary>
public static readonly Version Version = new Version(1, 20, 3);
public static readonly Version Version = new Version(1, 20, 4);

}

Expand Down
13 changes: 10 additions & 3 deletions Assets/Plugins/Bayat/SaveSystem/Runtime/SaveSystemAPI.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Bayat.SaveSystem.Security;
using Bayat.SaveSystem.Storage;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

using Bayat.SaveSystem.Security;
using Bayat.SaveSystem.Storage;

using UnityEngine;

namespace Bayat.SaveSystem
Expand Down Expand Up @@ -517,6 +519,11 @@ public static async Task<object> LoadIntoAsync(string identifier, object target,
}
}
if (isEncrypted)
{
cryptoStream = encryption.GetReadStream(stream, password);
underlyingStream = cryptoStream.UnderlyingCryptoStream;
}
if (isEncrypted)
{
try
{
Expand Down

0 comments on commit 5a61470

Please sign in to comment.