Fix after renames in SharpAESCrypt

This commit is contained in:
Kenneth Skovhede
2025-08-07 23:17:18 +02:00
parent ba7bee397c
commit cff8073b64
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ public static partial class Command
{
using var ms = new MemoryStream();
using var fs = File.OpenRead(rtcfg.Configuration.ConfigFiles.GpgKeyfile);
SharpAESCrypt.SharpAESCrypt.Decrypt(rtcfg.KeyfilePassword, fs, ms);
SharpAESCrypt.AESCrypt.Decrypt(rtcfg.KeyfilePassword, fs, ms);
var parts = System.Text.Encoding.UTF8.GetString(ms.ToArray()).Split('\n', 2, StringSplitOptions.RemoveEmptyEntries);
return (parts[0], parts[1]);
}
+2 -2
View File
@@ -1027,14 +1027,14 @@ public static partial class Command
{
using var ms = new MemoryStream();
using var fs = File.OpenRead(keyfile);
SharpAESCrypt.SharpAESCrypt.Decrypt(password, fs, ms);
SharpAESCrypt.AESCrypt.Decrypt(password, fs, ms);
var rsa = RSA.Create();
rsa.FromXmlString(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
return rsa;
}
catch (SharpAESCrypt.SharpAESCrypt.WrongPasswordException)
catch (SharpAESCrypt.WrongPasswordException)
{
if (!askForNewPassword)
throw;
+1 -1
View File
@@ -57,7 +57,7 @@ public static class Command
var newkey = RSA.Create(2048).ToXmlString(true);
using (var fs = File.OpenWrite(keyfile.FullName))
using (var ms = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(newkey)))
SharpAESCrypt.SharpAESCrypt.Encrypt(keyfilePassword, ms, fs);
SharpAESCrypt.AESCrypt.Encrypt(keyfilePassword, ms, fs);
Console.WriteLine($"Keyfile created at {keyfile.FullName}");
}, passwordOption, keyfileArgument);
+1 -1
View File
@@ -34,7 +34,7 @@ public static class EncryptionHelper
{
using var ms = new MemoryStream();
using var fs = File.OpenRead(passwordfile);
SharpAESCrypt.SharpAESCrypt.Decrypt(password, fs, ms);
SharpAESCrypt.AESCrypt.Decrypt(password, fs, ms);
return Encoding.UTF8.GetString(ms.ToArray());
}