Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7999669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:34:11+00:00 2026-06-04T15:34:11+00:00

I was hoping someone could help a non-PHP developer with an example of how

  • 0

I was hoping someone could help a non-PHP developer with an example of how to decrypt a Triple DES URL Encoded string (e.g. passed to the page in a querystring variable named “q”).

The key is 24 bit and the intialization vector is 8 bit.

In C# the original data is:

  1. UTF-8 encoded as a byte array
  2. Encrypted with the key and IV
  3. Encoded as a Base 64 string
  4. URL encoded as a string

…

byte[] rawData;
TripleDES tripleDESalg = TripleDES.Create();
rawData = UTF8Encoding.UTF8.GetBytes(message);
ICryptoTransform cTransform = tripleDESalg.CreateEncryptor(key, IV);
byte[] resultArray = cTransform.TransformFinalBlock(rawData, 0, rawData.Length);
tripleDESalg.Clear();
encryptedText = Convert.ToBase64String(resultArray);

…

In a PHP page, I can’t really find examples on how to these steps together:

  1. Decode the URL encoded string in the querystring variable “q”
  2. Decode the Base 64 encoded string (e.g. base64_decode)
  3. Decrypt the value using the same key and iv that was used to encrypt it (assume you control the encrypting and decrypting and both system know what the key and iv are)
  4. Print/echo the output

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:34:13+00:00Added an answer on June 4, 2026 at 3:34 pm

    Get value from query string

    $string = $_REQUEST['q'];

    URL Decode

    urldecode

    Base 64 Decode

    base64_decode

    Decryption

    Use mcrypt_decrypt.

    For the first parameter, you pass in the cipher (List of Ciphers), which, in your case, would be MCRYPT_DES.

    The remaining parameters would be the ciphertext, key, iv etc.

    The PHP manual is exhaustive. Use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was hoping someone could help me with a little issue I'm having trouble
Im using the .NET framework 1.1 and Im hoping someone could help me implement
I've come across 2 confusing problems in SML and was hoping someone could help
I was hoping someone could help me figure out what to do about a
I was hoping someone could help me with maven deployments (typically run through the
We have an interesting problem that I was hoping someone could help to shed
HI All I was hoping someone could help me improve a query I have
I was hoping someone could help with a complicated date range SQL query. I
I was hoping someone could help me out with this stupid problem I'm having
I got a problem I was hoping someone could help me figure out! I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.