/// <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);
        }
Ejemplo n.º 2
0
 /// <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();
 }
Ejemplo n.º 3
0
 /// <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())
 {
 }
Ejemplo n.º 4
0
 /// <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);
        }