Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

Enishi

@Enishi
About
Posts
10
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Cryptography
    E Enishi

    i am not sure, i think i tried that way but it didnt work for me, i needed to sign the data from the hash with the signature formatter cause it will encode it too. Try if u can do it that way, but i think the sign data didnt do the same as the signatureformatter

    C# cryptography tutorial question workspace

  • Cryptography
    E Enishi

    Hi, i used this code i hope it helps u and u understand it RSACryptoServiceProvider RSA; RSA = new RSACryptoServiceProvider(); byte[] rawData, hash; HashAlgorithm HashMan; HashMan = new SHA1CryptoServiceProvider(); rawData= System.Text.Encoding.Unicode.GetBytes(string PASSWORD); ///get the bytes of the original password hash = HashMan.ComputeHash(rawData); //uses the private key to generate the hash RSAPKCS1SignatureFormatter sf = new RSAPKCS1SignatureFormatter(RSA); //this one will use the public key to encode it more sf.SetHashAlgorithm("SHA1"); byte []FinalSignature= sf.CreateSignature(hash); //creates the signature, u will send this one to the receiver along with the public key RSA.ExportParameters(false); //this both sentences will give the public key, if u pass them true will give also the private key. RSA.ToXMLString(false); ull send to the receiver the FinalSignature and the RSAParameters or the string with the public key. in the receiver //if u used the RSA.EXPORTPARAMETERS RSAPKCS1SignatureDeformatter sd=new RSAPKCS1SignatureDeformatter(parameters); // or if u used the xml string RSAPKCS1SignatureDeformatter sd=new RSAPKCS1SignatureDeformatter(); sd.FromXMLString(string xmlParameters); // sd.SetHashAlgorithm("SHA1"); bool pd=sd.VerifySignature(hashinurdatabase,FinalSignature); i hope it helps u with the code if u dont uderstand something or want to ask something just say here or emailme. U will need to give to the SignatureDefformater the parameters of the RSACryptoServerProvider u used in the SignatuerDefformater or it will return u false.

    C# cryptography tutorial question workspace

  • button click event
    E Enishi

    put this as a class variable private ThreadStart ts= new ThreadStart(urfunctionhere); private Thread t=new Thread(ts); then in ur button u could do { button.enabled=false; if(t!=null&&!(t.isAlive)) //this will check if the user hits the button when ur function is runing -- if the thread its stopped will start-- { t.start(); } button.enabled=true; } hope this help u

    C# design help

  • Diferences between null,close and dispose
    E Enishi

    Okay now i see it more clear. Cause im working with 2 mates and 1 always does null, the other allways do Close or Dispose, and when i asked what was the difference they didnt know what to answer me. Ty for ur answers ppl.I appreciate ur help

    C# question tutorial

  • Diferences between null,close and dispose
    E Enishi

    Ok heres a question its roaming my mind. Whats the difference doing for example. SqlConnection con= new SqlConnection(connection_string); con.close(); con.dispoe(); and con= null; AFAIK i think this. Close just clsoes the connection and can be opened again, dipose frees the resources so it cant be opened again, must declare again and null makes the GC get it faster. With this object i see it clearly but its the same for others? DataSet ds= new DataSet(); Lets take about datasets, if i do a ds.dispose() its completely erased? and what about if i do ds=null; whats will do if i return the dataset in a method and later i do a dispose or a null in the finally clausule. Ty for ur time.

    C# question tutorial

  • How to handle event in PictureBox?
    E Enishi

    hi, i have tested it and it works. here are the 2 lines of my code this.pictureBox1.DoubleClick += new System.EventHandler(pictureBox1_DoubleClick); this.pictureBox1.MouseDown +=new MouseEventHandler(pictureBox1_MouseDown); Make sure u get the sender and event args and no exception is skipping ur code. I made a pic box which changes the location on double click and changes image in mouse down , show the methods code to see whats wrong.

    C# help tutorial question

  • local method variable or global class ?
    E Enishi

    depends when and how much are u gonna use them. If the brushes are only used in the paint event , just create them there and when u finish the paint just free them , that way ull gain more resources. A local variable is only of use to those in the same method as she is. A global variable will be usable by all the class, if u would use the brushes in 3 or 4 methods just create it global so ull create once.Normally gobal variables are used to control methods or handles like threads and such. if u create the brushes global ull be using the memory al the time cause ull carry them along the class, if u create them local then ull create them and freeing the memory after u used them. Usually the few global variables u use the better structured is the class.

    C# graphics question

  • Windows Services in Foreground
    E Enishi

    I have created a Windows service which compares the Current Date with one stored in the registry and if they are the same or the date stored in the registry is older than the current it launches an updater. The updater is an exe i created too and it works perfectly using the ThreadPool class, but the main problem is the files it download could be images as they could be videos so the download may take a time. I have some buttons and properties in the updater but if its launched from the Windows Service , the updater runs in the background. I know theres a property from the management service aplication( Allow interaction with desktop) but ¿ is there a property which allow u to do that from the main code, wen u install the service or so? Dont like the idea of phoning my customers and tell em what to do or just drive for hours just to go there and make 2 clicks. Ty for ur time.

    C# windows-admin help question

  • Attaching custom methods
    E Enishi

    TY a lot for your help and examples, it works perfect now.

    C# question csharp design help

  • Attaching custom methods
    E Enishi

    Hi, im new to C# and have a problem when i must assign methods to objects i create in execution mode. while in design mode u can create a timer and then double click on it and there u go, but how can i attach a method to a timer i have created in execution time? using System.Timers; Timer t = new timer(30000); t.enabled=true; //but how i tell the timer what method or event to raise when its interval elapses? Ty for ur time.

    C# question csharp design help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups