예제 #1
0
 public void AddEncryptTask( String fileFullPath_Local , String fileFullPath_Dropbox , String hashValue_Local , UInt64 fileSize )
 {
     TaskUnit task = new TaskUnit(fileFullPath_Local, fileFullPath_Dropbox, size:fileSize , hashValueOfPlaintext: hashValue_Local);
     task.TaskType = TaskType.Encrypt;
     VelostiScsi.EncryptWaitingList.Add( task );
     VelostiScsi.EncryptWaitingList.Sort();
     this.StartWork();
 }
예제 #2
0
 public void AddDecryptTask(String fileFullPath_Dropbox, String fileFullPath_Local, String cryptTextHash,UInt64 fileSize, String Key)
 {
     TaskUnit task = new TaskUnit(fileFullPath_Local, fileFullPath_Dropbox, Key, size:fileSize,hashValueOfCryptotext: cryptTextHash);
     task.TaskType = TaskType.Decrypt;
     VelostiScsi.DecryptWaitingList.Add( task );
     VelostiScsi.DecryptWaitingList.Sort();
     this.StartWork();
 }
예제 #3
0
        public void AddEncryptTask(String fileFullPath_Local, String fileFullPath_Dropbox, String hashValue_Local, UInt64 fileSize)
        {
            TaskUnit task = new TaskUnit(fileFullPath_Local, fileFullPath_Dropbox, size: fileSize, hashValueOfPlaintext: hashValue_Local);

            task.TaskType = TaskType.Encrypt;
            VelostiScsi.EncryptWaitingList.Add(task);
            VelostiScsi.EncryptWaitingList.Sort();
            this.StartWork();
        }
예제 #4
0
        public void AddDecryptTask(String fileFullPath_Dropbox, String fileFullPath_Local, String cryptTextHash, UInt64 fileSize, String Key)
        {
            TaskUnit task = new TaskUnit(fileFullPath_Local, fileFullPath_Dropbox, Key, size: fileSize, hashValueOfCryptotext: cryptTextHash);

            task.TaskType = TaskType.Decrypt;
            VelostiScsi.DecryptWaitingList.Add(task);
            VelostiScsi.DecryptWaitingList.Sort();
            this.StartWork();
        }
예제 #5
0
        public int CompareTo(object obj)
        {
            TaskUnit tu2 = obj as TaskUnit;

            if (tu2 == null)
            {
                return(1);
            }
            if (this.Size < tu2.Size)
            {
                return(-1);
            }
            else if (this.Size == tu2.Size)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }