/// <summary> /// Creates a clone of this FluidDynamicsKey object. /// </summary> /// <returns> /// A new FluidDynamicsKey object whose values are /// copied from the calling object. /// </returns> public FluidDynamicsKey Clone() { FluidDynamicsKey newKey = new FluidDynamicsKey( this.r_mdot, this.mDotKey, this.r_qdot, this.qDotKey, this.k0, this.epsilon, this.tFrame, this.SecretImage); return(newKey); }
/// <summary> /// Full initialization constructor. /// </summary> /// <param name="plaintextImage"> /// The image that is to be encrypted. /// </param> /// <param name="key"> /// The FluidDynamicsKey object that is used to encrypt the image. /// </param> public FluidDynamicsEncryptor(Bitmap plaintextImage, FluidDynamicsKey key) { this.PlaintextImage = (Bitmap)plaintextImage.Clone(); Key = key.Clone(); }
/// <summary> /// Basic initialization constructor with a predefined plaintext image. /// </summary> /// <param name="plaintextImage"> /// The image that will be encrypted once a key is defined. /// </param> public FluidDynamicsEncryptor(Bitmap plaintextImage) : this(plaintextImage, FluidDynamicsKey.Generate()) { }
/// <summary> /// Basic constructor with a predefined key. /// </summary> /// <param name="key"> /// The FluidDynamicsKey object that will be used by the cryptosystem. /// </param> public FluidDynamicsEncryptor(FluidDynamicsKey key) : this(null, key) { }
/// <summary> /// Generates a new random key that is within the valid keyspace. /// </summary> /// <returns> /// A new FluidDyanmicsKey object whose values are within the /// correct logistic map keyspace. /// </returns> public static FluidDynamicsKey Generate() { FluidDynamicsKey newKey = new FluidDynamicsKey(); return(newKey); }