Results 1 to 2 of 2

Thread: Need help converting .NET string conversion to PHP

  1. #1
    Join Date
    Nov 2009

    Need help converting .NET string conversion to PHP

    I need to convert a single line of code from .NET to PHP. I'm hoping that there is a .NET developer here that also knows PHP. Since I don't know .NET, I'm not even sure where I can find relevant documentation.

    string newString = Convert.ToBase64String(SHA512.Create().ComputeHash(Encoding.ASCII.GetBytes(oldString)));
    Thanks in advance for any help that you can provide...

  2. #2
    Join Date
    Nov 2009
    So I solved this, sort-of.

    I ended up writing a C# program in Linux using mono that takes a single argument (oldString in the function above) and returns newString to the console. To get the value of newString in PHP I'm making a call to this binary and storing the result to be used later in my script.

    I'd like to find a fully native PHP method to do this but I guess that I've found a work around for the time being.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center