public Config(string defaultPath, string password, CryptographicAlgorithmImpl crypto, SteganographicAlgorithmImpl stego) { DefaultPath = defaultPath; Password = password; Crypto = crypto; Stego = stego; }
public DocumentMessage(string path, bool compression = false, CryptographicAlgorithmImpl crypto = null, string password = null) : base(path, compression, crypto, password) { if (!File.Exists(path)) { throw new FileNotFoundException(path); } }
protected SecretMessage(byte[] bytes, bool compression, CryptographicAlgorithmImpl crypto, string password) { if (bytes == null || bytes.Length <= 0) { throw new ArgumentNullException(nameof(bytes)); } Bytes = bytes; Compression = compression; Crypto = crypto; mPassword = password; }
protected SecretMessage(string obj, bool compression, CryptographicAlgorithmImpl crypto, string password) { if (string.IsNullOrEmpty(obj)) { throw new ArgumentNullException(nameof(obj)); } mMessage = obj; Compression = compression; Crypto = crypto; mPassword = password; }
public DecodeModel(string imageSrc, CryptographicAlgorithmImpl crypto, string passsword, SteganographicAlgorithmImpl stegano, bool compression, int lsbIndicator) { mSrcObj = imageSrc; mCompression = compression; //Crypt CryptoAlgorithm = crypto; mPassword = passsword; //Stegano SteganoAlgorithm = stegano; mLsbIndicator = lsbIndicator; }
public CryptionModel(string password, CryptographicAlgorithmImpl algorithm) { if (string.IsNullOrEmpty(password)) { IsEnabled = false; } else { IsEnabled = true; Password = password; ConfirmationPassword = password; } Algorithm = algorithm ?? AlgorithmList.FirstOrDefault(); }
internal void Save(string password, CryptographicAlgorithmImpl selectedEncryptionMethod, SteganographicAlgorithmImpl selectedSteganographicMethod, string standardPath) { Password = password; SelectedEncryptionMethod = selectedEncryptionMethod; SelectedSteganographicMethod = selectedSteganographicMethod; DefaultPath = standardPath; var config = new Config(DefaultPath, Password, SelectedEncryptionMethod, SelectedSteganographicMethod); var file = Path.Combine(Constants.AppData, "Config.json"); var sw = new StreamWriter(File.Create(file)); using (var writer = new JsonTextWriter(sw)) { mSerializer.Serialize(writer, config); } }
private string Encode(string src, string message, CryptographicAlgorithmImpl crypt = null, string password = null, bool compression = false, int lsbIndicator = 3) { var model = new EncodeModel(src, message, crypt, password, Algorithm, compression, lsbIndicator); mStopwatch.Start(); var result = model.Encode(); mStopwatch.Stop(); mEncryptionTime = mStopwatch.Elapsed; mStopwatch.Reset(); return result; }
public TextMessage(byte[] bytes, bool compression = false, CryptographicAlgorithmImpl crypto = null, string password = null) : base(bytes, compression, crypto, password) { }
public DocumentMessage(byte[] bytes, string extension, bool compression = false, CryptographicAlgorithmImpl crypto = null, string password = null) : base(bytes, compression, crypto, password) { mExtension = extension; }