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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:03:11+00:00 2026-06-07T05:03:11+00:00

This MD5 call has 3 arguments, MD5, the string, and then the $transaction_key hash_hmac(md5,

  • 0

This MD5 call has 3 arguments, “MD5”, the string, and then the $transaction_key

hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key);

How would I reproduce this in Scala? I can’t find an MD5 function that takes a “key”.

  • 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-07T05:03:13+00:00Added an answer on June 7, 2026 at 5:03 am

    Here’s a Scala version derived from this Java answer:

    def encode(message: String, key: String) = {
      val mac = javax.crypto.Mac.getInstance("HmacMD5")
      mac.init(new javax.crypto.spec.SecretKeySpec(key.getBytes, "HmacMD5"))
      mac.doFinal(message.getBytes).map("%02x".format(_)).mkString
    }
    

    It produces the same output as PHP’s hash_hmac for me on a couple of quick tests.

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

Sidebar

Related Questions

This my function public string getMD5hash(string input) { //create a new instance of MD5
I'm aware that MD5 has had some collisions but this is more of a
I was given this Python code that would calculate an MD5 value for any
If I set cookies like this: $_SESSION[md5('ponies'.$salt)] = $value; so that only knowing the
This is a general question about character encoding when using MD5 libraries in various
This is the bit of Ruby I want to implement in Python: Base64.urlsafe_encode64([Digest::MD5.hexdigest(url).to_i(16)].pack(N)).sub(/==\n?$/, '')
I pasted the code given in this link to a file called md5.js. http://www.webtoolkit.info/javascript-md5.html
I have gone through this page... http://www.php.net/manual/en/function.hash.php MD5 is 32 characters long while sha1
When I am encrypting 23 using MD5 encryption I am getting 37693cfc748049e45d87b8c7d8b9aacd this 32-character
I have a cross-language problem regarding md5 :). I have this code in Java:

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.