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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:08:45+00:00 2026-05-26T22:08:45+00:00

It was not me who wrote this code, it was the previous programmer. However,

  • 0

It was not me who wrote this code, it was the previous programmer. However, I noticed he didn’t provide a decryption algorithm, rendering the encryption useless.

How can I decrypt this?

function Encrypt(jstr: String): String;
var
  I: Integer;
  A: Real;
begin
  if Length(jstr) = 0 Then begin
    Result := '';
    Exit;
  end;
  A := 0;
    for I := 0 To Length(jstr) do
      A := A + (Ord(jstr[I]) * Pos(jstr[I],jstr)) / 33;
  Result := FormatFloat('0000000000.0000000000',A);
  if Pos(',',Result) > 0 then begin
    Insert('.',Result,Pos(',',Result));
    Delete(Result,Pos(',',Result),1);
  end;
end;

Thanks!

  • 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-26T22:08:46+00:00Added an answer on May 26, 2026 at 10:08 pm

    That function cannot be reversed. Since it takes input of arbitrary length and returns output of finite length, simple information theory tells you the futility of attempting to write a general inverse. Even for shorter input strings it seems to me that different input strings can result in the same encrypted string.

    Even as a hash this function seems very brittle to me due to the bizarre use of floating point code. If I were you I would replace this function with something more fit for purpose.

    Finally, I recommend that you undertake a review of all code produced by this developer. The low quality of this code and algorithm suggests to me that everything that this developer touched is liable to have defects.

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

Sidebar

Related Questions

This is weird and I'm not sure who the culprit really is. I'm doing
For those who are not aware, Lotus Notes is a cool system, which has
I have some clients who are not English speaking. They would like the JavaScript
To recap for those .NET gurus who might not know the Java API: ConcurrentHashMap
I would like to create a folder that users who do not have privileges
I know many people who use computers every day, who do not know how
I'm creating an iPhone app for a client who's not comfortable with allowing users
How does Stack Overflow auto-generate the gravatars for those users who do not upload
Can you suggest some good Javascript assignments/homework to C programmers , who are not
Who knows a good component for a calendar control (NOT date/time picker)? Calendar control

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.