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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:06:05+00:00 2026-06-17T09:06:05+00:00

I want to sign the calls to my REST API with a message authentication

  • 0

I want to sign the calls to my REST API with a message authentication code(MAC), which algorithm is easily and comfortable to use in Java, php, Ruby and C#?

The longer Story:
My application(Play Framework 2.0) provides a very simple REST API, just a couple services that will be accessible by a limited and known* group of clients. Security is important here, also is ease of use for the clients.

(* known means they have to register with the application first, this is where they get there secret for the MAC, I have no Idea who they are and what technologies they use.)

I want to implement the following approach:

  • Use SSL
  • Sign the REST messages with a MAC

I implemented a test case where I used my password encrypter(Similar to the example code here) with PBKDF2WithHmacSHA1 for the signing. It took me some time to get the signing working, especially because I want to send the signature as an URL parameter and had to encode it two times to get it in the correct format.

The generated signature is a byte[] which I convert to a UTF-8 encoded String with org.apache.commons.codec.binary.StringUtils and then encode it again with java.net.URLEncoder to get a correct URL parameter. The solution works, but feels kind of stupid and overly complicated.

This experience brought me to this question, I want to make it easily and comfortable for my clients to use the service, but also very secure. So, what crypto algorithm do I choose for my signature? What is easy to implement for the most common web plattforms like Java, php, Ruby, C# and at least somehow usable in less common languages.

  • 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-17T09:06:06+00:00Added an answer on June 17, 2026 at 9:06 am

    byte[] converted to a hexString is probably the easiest format to use for the signatures – hex characters [0-9a-f] don’t need special encoding. Apache Commons codec provides conversion methods under the Hex class.

    HMAC-SHA256 is the gold standard of HMAC algorithms, and should be present on any platform worth using.

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

Sidebar

Related Questions

I want a simple sign in app in which a user logins successfully if
I want to develop a Single-Sign-On(SSO) or centralized authentication server (CAS) project for SSO
I am using node (8.14.0) and want to access the Twitter REST API v1.1.
I want to call ESHA Research nutrient REST API. I cannot seem to figure
I want to sign up windows azure free trial , however no china options
I want to sign users in automatically after they create an account. My application
The reason I want to sign the dll is because I want to add
I want to give an alert after person sign up successfully. And then I
I want to add a + (plus sign) before all the occurrences of image
I want to integrate GMAIL Single Sign on (SSO) on my App.. I am

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.