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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 249k
  • Answers 249k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You should perform the coloring in the CellPainting event, rather… May 13, 2026 at 9:09 am
  • Editorial Team
    Editorial Team added an answer Use: string s = "REF_SPHCPHJ0000057_Cancel Payer_20100105174151.pdf"; string middleBit = s.Split('_')[2];… May 13, 2026 at 9:09 am
  • Editorial Team
    Editorial Team added an answer Try here : http://en.cppreference.com/w/ However, you may also be refering… May 13, 2026 at 9:09 am

Related Questions

This is an erlang problem, it seems. I have this code to test the
I'm new to Flex, although not new to programming. I want to write a
I'm looking for advice as to coding conventions. The primary languages I use, in
Sorry if the title is unclear - not sure how to phrase it. Feel

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.