/// <summary> /// Decrypts the text. /// </summary> public void DecryptText() { if (this.DecryptedText == null) { this.DecryptedText = DecryptionManager.DecryptText(this.ExtractedText, this.keyword); } }
/// <summary> /// Decrypts a cipher text using a password to generate an alphabet character array. /// </summary> /// <param name="text"></param> /// <param name="password"></param> /// <returns></returns> public string Decrypt(string text, string password) { var alphabet = new Alphabet().GenerateAlphabetFromPassword(password); var manager = new DecryptionManager(); return manager.Decrypt(text, alphabet); }
/// <summary> /// Decrypts the image. /// </summary> public void DecryptImage() { if (this.DecryptedPicture == null) { this.DecryptedPicture = new Picture(); this.copySourcePicture(this.ExtractedPicture, this.DecryptedPicture); DecryptionManager.DecryptPicture(this.DecryptedPicture); this.DecryptedPicture.ModifiedImage = new WriteableBitmap((int)this.DecryptedPicture.Width, (int)this.DecryptedPicture.Height); } }
/// <summary> /// Decrypts a cipher text using an alphabet character array. /// </summary> /// <param name="text"></param> /// <param name="alphabet"></param> /// <returns></returns> public string Decrypt(string text, char[] alphabet) { var manager = new DecryptionManager(); return manager.Decrypt(text, alphabet); }