Esempio n. 1
0
        /// <summary>
        /// Callback method for recryption thread
        /// </summary>
        /// <param name="ar">Results from the execution of the recrypt thread</param>
        private static void RecryptDatabaseCallback(IAsyncResult ar)
        {
            RecryptDatabaseDelegate del = (RecryptDatabaseDelegate)((System.Runtime.Remoting.Messaging.AsyncResult)ar).AsyncDelegate;

            try
            {
                del.EndInvoke(ar);
            }
            catch (Exception ex)
            {
                Logger.Error("Unhandled exception occured during the recryption process.", ex);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Decrypts the payment data using old key and Re-Encryptes it using the new key.
 /// </summary>
 /// <param name="oldKey">The old encryption key</param>
 /// <param name="newKey">The new encryption key</param>
 private static void LaunchRecryptionOnNewThread(byte[] oldKey, byte[] newKey)
 {
     RecryptDatabaseDelegate del = new RecryptDatabaseDelegate(InternalRecryptDatabase);
     AsyncCallback           cb  = new AsyncCallback(RecryptDatabaseCallback);
     IAsyncResult            ar  = del.BeginInvoke(Token.Instance.StoreId, oldKey, newKey, cb, null);
 }