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
N

nyjcr

@nyjcr
About
Posts
15
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Signing Data using RSA
    N nyjcr

    Hello, I'm having difficulty signing a string using the RSA cryptography algorithm. I've search here in this forum for sample code, but I guess, signing is not that popular. Anyway, any help would be greatly appreciated. here is my code.

    public static string SignMyData(string data2Sign)
    {
    AssignPr(); //assigning the parameter, container, etc

    byte[] byte2Sign = System.Text.Encoding.UTF8.GetBytes(data2Sign);

    StreamReader reader = new StreamReader(@"C:\MyPrivateKey.xml");
    string pubPriKeyXML = reader.ReadToEnd();
    rsa.FromXmlString(pubPriKeyXML); //(I'm getting error "Invalid syntax on line 1".)
    reader.Close();

    byte[] byteSig = rsa.SignData(byte2Sign, "SHA1");
    return System.Text.Encoding.UTF8.GetString(ByteSig);
    }

    If anyone knows of a simple tutorial or can guide me through this, that would be great Thanks JC

    C# help tutorial docker algorithms xml

  • RSA key exchange
    N nyjcr

    Hi, I've been able to generate RSA key pair, and exporting them to XML files, (thanks to tutorials found in this forum) The problem I'm facing is that I want to send the public key via socket communication to another server. I will then use the public key to encrypt a password, which will be use for symmetric encryption communication between the two hosts. I try sending the xml file, but I cannot seem to be able convert back to XML in the other end. so then I thought if I could send the public key as a "string" which I could just load on the other end. is this possible? or is there a better way to share this "password key" for symmetric encryption. Sorry if this is simple, I'm completely new to c# and programming. Thanks, JC

    C# csharp sysadmin security xml help

  • C# Converting socket communitation ( byte[] ) to string
    N nyjcr

    Hi, Sorry if this is a simple question, I'm learning c# and I'm trying to send a string to another computer, but when I receive the string I want to store that string in an xml file the problem is that the string comes with "empty" characters at the end. so my xml looks like "abc.........) follow by many empty chars. here is the code I'm using to get the data. using tcp sockets

                        Byte\[\] received = new Byte\[256\];
                        int bytesReceived = server1Tcp.Receive(input, input.Length, 0);
                        dataReceived = System.Text.Encoding.ASCII.GetString(input);
    

    How can I save the "dataReceived" string without the empty chars. again, thank you to all of you who have helped me learn C# -JC

    C# question csharp xml help learning

  • Visual C# - Prevent console window from launching
    N nyjcr

    Wow, I must be blind, I went through that before and did not noticed that... thank you for your help -JC

    C# csharp help question

  • Change an XML attribute using C#
    N nyjcr

    Thank you for your help.. How I got it to work. created a new element, assigned the old node to a new node specific to my search criteria

    newnode = root.SelectSingleNode("Students/Student/[@userid='" + loginform.userid + "']");

    I then created a new attribute and used the append function to add the newly created attribute as the last attribute. saved the document... and it worked.. hope this help someone.... thanks again. JC

    C# csharp xml help tutorial

  • Visual C# - Prevent console window from launching
    N nyjcr

    Hi All, I have a windows form program, which runs and compiles fine. but along with the form window, there is a console window (black "command prompt" screen) that also launches, none of my other window program have this behavior. where can I stop the black window from launching? I looked at all the code and can't find it, so I'm assuming is some settings that I need to turn off. again, thank you all for all the help you have provided to this newbie. -JC

    C# csharp help question

  • [Message Deleted]
    N nyjcr

    Sorry, I posted to the wrong forum... I, try to move it to the C# forum...

    Visual Basic

  • [Message Deleted]
    N nyjcr

    [Message Deleted]

    Visual Basic

  • Change an XML attribute using C#
    N nyjcr

    Hello all, I'm trying to change an attribute in an XML document based on some criteria, I'm using C#, For example I need to do a "search" based on a person's user id, the user id is an attribute of a node name student. if the userid matches a text box I then need to change the Grade attribute of the student. for example, my xml document looks like this I want to 'search' for student 345 and then change the Grade to an 'A' Any help would be greatly appreciated. JC

    C# csharp xml help tutorial

  • update an xml attribute
    N nyjcr

    ok, but if I load the document then I need to go to a certain location depending on the information a user enters in a textbox I tried the below code, but I get an error "The process cannot access the file 'file.xml' because it is being used by another process."

    XmlDocument upd = new XmlDocument();
    upd.Load("file.xml");
    XmlAttribute AttrUpd = upd.CreateAttribute("value");
    AttrUpd.Value = "35.00";
    upd.Save(file.xml); //THIS IS WHERE I GET THE ERROR
    

    thanks

    C# question csharp xml help announcement

  • update an xml attribute
    N nyjcr

    Hello, 1st, sorry for such a simple question...well maybe simple I'm new to c# and especially xml. I'm using an XmlTextReader to loop through an xml document, using if statements to "stop" at certain nodes. once I stop at certain nodes, I need to update one of the attributes. How can I update a single attribute while (CashReader.Read()) { // Move to first element CashReader.MoveToElement(); if (CashReader.Name == "Shopper") { CashReader.MoveToAttribute(i); if (CTFReader.Value == frmLogin.vID) { i=2 CashReader.MoveToAttribute(i); //I NEED TO UPDATE SHOPPER HERE if (CashReader.Value == "") { //THIS IS WHERE I WANT TO INSERT THE CODE TO UPDATE THE ATTRIBUTE CTFReader.Close(); thank you in advance for the help JC

    C# question csharp xml help announcement

  • C# navigating to top of page
    N nyjcr

    Hello, I'm trying to navigate from the middle of the xml page back to the top(to the parent node). So I can perform another search looking for matches to my random number,

    while (xmlReader.Read()) //while loop to verify the new number is unique
    {

                    xmlReader.MoveToElement();
                    TempNo = xmlReader.Value;
                    if (tempNo == Convert.ToString(userID))
                    {
                        //if already exist, create new one
                        UserID = RadNo.Next(10, 99); //Random number
                        
                        //At this point I want to start searching again
                        //Move to the top of the parent node (1st node on page)
                        //and search all nodes again.
                    }
                }
    

    The above is my code, hope this help. Sorry if this is a simple question, I'm totally new to xml and c# just learning it really... -JC

    C# csharp algorithms xml help question

  • Database access through VB.Net
    N nyjcr

    Thank you... VB is supposed to be this easy to learn, "foolproof" language...Its not!

    Visual Basic database csharp help announcement

  • Database access through VB.Net
    N nyjcr

    Wow, I was way off.. Let me give this a try... thank you "Chaos Machine"

    Visual Basic database csharp help announcement

  • Database access through VB.Net
    N nyjcr

    Hi, Does anybody know where I can find some information on Database access/update/delete through VB.NET I'm creating a program with multiple forms, which needs to select,add,delete record from an ACCESS DB. It is my first DB project and I'm totally lost... Any help I would greatly appreciate it... Thank you, CJ :confused:

    Visual Basic database csharp help announcement
  • Login

  • Don't have an account? Register

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