Migrate encryption consumers to AES-GCM

This commit is contained in:
Andy Howard
2026-09-16 18:41:44 +01:00
parent 975779128f
commit 8bb11ca743
18 changed files with 190 additions and 96 deletions
@@ -5,6 +5,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Sarand.BusinessMgr.Net.Core.Web.App;
using Sarand.BusinessMgr.Net.Standard.Base.App;
using Sarand.BusinessMgr.Net.Standard.Base.Data;
using Sarand.BusinessMgr.Net.Standard.Base.Mgr.Control;
using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Core;
@@ -119,13 +120,9 @@ namespace Sarand.BusinessMgr.Net.Core.Web.Components
//-------------------------------------------------------------------
// Online encryption parameters.
//-------------------------------------------------------------------
// Portal Request Password encryption parameters (key & IV) are defined in
// Portal Request Password encryption key is defined in
// the base Controller so that they can be shared with the Control application.
// NB IV value is generated from the key and fixed so that it doesn't change when the application restarts.
// IV Must be regenerated if key is changed.
protected static string Base64Key_RequestPassword_Portal { get; } = SacsEncryptionHelper.EncodePlainKey("[5Abus1neSSmGR~Request#Password}", SacsEncryptionHelper.KeyLength);
//private static String Base64IV_RequestPassword_Generated_Portal = SacsEncryptionHelper.InitSymmetricEncryptionIV(Base64Key_RequestPassword_Portal);
protected static string Base64IV_RequestPassword_Portal { get; } = "8TRhBayBJZmACQ6pld1F9A==";
//-------------------------------------------------------------------
// Session.