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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:54+00:00 2026-05-12T18:50:54+00:00

This function is written in ActionScirpt. What kind of decryption this is? Is there

  • 0

This function is written in ActionScirpt. What kind of decryption this is? Is there existing function in PHP for this function?

function decrypt(str, key1, key2) {
  var v1 = [];
  var v3 = 0;
  while (v3 < str.length) {
    switch (str.charAt(v3)) {
      case '0':
        v1.push('0000');
        break;
      case '1':
        v1.push('0001');
        break;
      case '2':
        v1.push('0010');
        break;
      case '3':
        v1.push('0011');
        break;
      case '4':
        v1.push('0100');
        break;
      case '5':
        v1.push('0101');
        break;
      case '6':
        v1.push('0110');
        break;
      case '7':
        v1.push('0111');
        break;
      case '8':
        v1.push('1000');
        break;
      case '9':
        v1.push('1001');
        break;
      case 'a':
        v1.push('1010');
        break;
      case 'b':
        v1.push('1011');
        break;
      case 'c':
        v1.push('1100');
        break;
      case 'd':
        v1.push('1101');
        break;
      case 'e':
        v1.push('1110');
        break;
      case 'f':
        v1.push('1111');
    }
    ++v3;
  }
  v1 = (v1.join('')).split('');
  var v6 = [];
  v3 = 0;
  while (v3 < 384) {
    key1 = (key1 * 11 + 77213) % 81371;
    key2 = (key2 * 17 + 92717) % 192811;
    v6[v3] = (key1 + key2) % 128;
    ++v3;
  }
  v3 = 256;
  while (v3 >= 0) {
    var v5 = v6[v3];
    var v4 = v3 % 128;
    var v8 = v1[v5];
    v1[v5] = v1[v4];
    v1[v4] = v8;
    --v3;
  }
  v3 = 0;
  while (v3 < 128) {
    v1[v3] ^= v6[v3 + 256] & 1;
    ++v3;
  }
  var v12 = v1.join('');
  var v7 = [];
  v3 = 0;
  while (v3 < v12.length) {
    var v9 = v12.substr(v3, 4);
    v7.push(v9);
    v3 += 4;
  }
  var v2 = [];
  v3 = 0;
  while (v3 < v7.length) {
    switch (v7[v3]) {
      case '0000':
        v2.push('0');
        break;
      case '0001':
        v2.push('1');
        break;
      case '0010':
        v2.push('2');
        break;
      case '0011':
        v2.push('3');
        break;
      case '0100':
        v2.push('4');
        break;
      case '0101':
        v2.push('5');
        break;
      case '0110':
        v2.push('6');
        break;
      case '0111':
        v2.push('7');
        break;
      case '1000':
        v2.push('8');
        break;
      case '1001':
        v2.push('9');
        break;
      case '1010':
        v2.push('a');
        break;
      case '1011':
        v2.push('b');
        break;
      case '1100':
        v2.push('c');
        break;
      case '1101':
        v2.push('d');
        break;
      case '1110':
        v2.push('e');
        break;
      case '1111':
        v2.push('f');
    }
    ++v3;
  }
  return v2.join('');
}
  • 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-05-12T18:50:55+00:00Added an answer on May 12, 2026 at 6:50 pm

    It looks like its converting hexadecimal values in to single byte binary values and pushing them onto the stack (although those values are probably not actually stored as single bytes.) And then there’s second case statement doing the reverse operation.

    There is also some scrambling or unscrambling (multiplying by a specified value adding a specified number and then the modular division); of the strings passed in. With the finally module 128 operation the joined string looks suspiciously like someone returning a valid ASCII code to write out to disk based on the hashed value of the joined strings. Though, it seems to me like you’d get a lot of collisions doing that; but maybe not. I suppose it might work well if you original data set only contains ASCII values.

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

Sidebar

Related Questions

In PHP, if I have a function written like this function example($argument1, $argument2=, $argument3=)
I have this function written: <script type="text/javascript"> function getStartDate(value) { $.post("gSearch.php", {dateSearch:value}, function(data){ $('#results').html(data);
I've written this very simple function to replace a file extension using LINQ in
I have written a function to print database table to an array like this
I have written my own function, which in C would be declared like this,
This function is written twice to save the checkbox state as well as the
This is a really great function written in jQuery to determine the value of
It is written in the documentation : This function is used to asynchronously read
I have written a simple function: function inputChanged() { $('input').change(function(){ $(this).addClass('changed'); }); } I
I have written this function in SQL and I can't figure out why but

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.