public void SaveKeyIVPair(pfEncryptionAlgorithm alg, pfKeyIvPair kvp, string filePath) { try { PFKeyIVValues kvv = new PFKeyIVValues(kvp.key, kvp.IV); kvv.Algorithm = alg; kvv.SaveToXmlFile(filePath); } catch (System.Exception ex) { _msg.Length = 0; _msg.Append(AppGlobals.AppMessages.FormatErrorMessage(ex)); DisplayErrorMessage(_msg.ToString(), _saveErrorMessagesToAppLog); } finally { ; } }
public pfKeyIvPair LoadKeyIVPair(string filePath) { pfKeyIvPair kvp = new pfKeyIvPair(); try { PFKeyIVValues kvv = PFKeyIVValues.LoadFromXmlFile(filePath); kvp.key = kvv.Key; kvp.IV = kvv.IV; } catch (System.Exception ex) { _msg.Length = 0; _msg.Append(AppGlobals.AppMessages.FormatErrorMessage(ex)); DisplayErrorMessage(_msg.ToString(), _saveErrorMessagesToAppLog); } finally { ; } return(kvp); }
public pfKeyIvPair GenerateKeyIVPair(pfEncryptionAlgorithm alg) { pfKeyIvPair ki = PFEncryption.GenerateKeyIvPair(alg); return(ki); }