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 8738663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:46:33+00:00 2026-06-13T10:46:33+00:00

I have a var being passed through a javascript function and I’m looking to

  • 0

I have a var being passed through a javascript function and I’m looking to obfuscate the var before being sent to the user then reverted when submitted back through php.

$data = "111:222:333:444";

$data is being generated and put into the view (javascript function)

<img src="button.jpg" alt="" onclick="newfunc(111:222:333:444)" />

Its then sent back to the sever to process

Is there anyway to hash this number so it will look like

“8f8fu8vu8fu8fhguf99fu8fu8fu8fu” insted of 111:222:333:444?

Is there any php functions that are similar to md5 that allow you to revert back to de-obfuscate the var?

Any help would be greatly appreciated.

  • 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-13T10:46:34+00:00Added an answer on June 13, 2026 at 10:46 am

    It is impossible to securely encrypt (read truly obfuscate) anything using javascript.

    There is, for example, a bluefish encryption library for javascript, but since the private key needs to be known to the javascript function in question.. the client/browser doing the encryption has to know the key, therefore it cannot, by design, be secure.

    What you can do, is trust “security through obscurity” (but again, client side security can never work) and base64-encode the string to “obfuscate it”..

    Everyone who knows what they are doing will be able to revert any attempt you make at obfuscating the string…

    BUT! You can send the string to your server (via an ajax call), have it asynchronously encrypt the plaintext and return you truly obfuscated text.. which the server, in turn can then decrypt (again via an ajax call).

    hope that helps….

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

Sidebar

Related Questions

I have an [object Object] being passed as an argument through a jQuery function
I have var marker = geo.geocode({address: adr}, geoc); where function geoc(results, status) {... I
Let's say you have var funct=function(a,b){ return a+b; }; console.log(funct); Is there any way
I have a LINQ in a method that is being passed an array of
I have an app that uses the Javascript SDK and the height is being
In a header file i have which is populated by PHP: <script type=text/javascript> var
I have basically to select all employee from companies which are being passed so
I have some predicates being dynamically built that have the following signature passes through
I have var xmlConfiguration = InitTestConfiguration(); var xmlConfiguration2 = InitTestConfiguration(); Assert.AreEqual(xmlConfiguration, xmlConfiguration2); And I
I have var row=<tr><td>val</td><td>val2</td></tr> and I tried this: $(#mainTable tbody).append(row); but it appends to

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.