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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:43:48+00:00 2026-05-24T18:43:48+00:00

I am looking to see if there is a possibility to generate two same

  • 0

I am looking to see if there is a possibility to generate two same alpha-numeric strings in two different java codes. This is for the purpose of secured communication between client and server.

Or is there an alternative way to do this?

I looked at the usual ways of public private key encryption and related stuff. For my requirement, I do not need such a mechanism as its kind of too much of standard stuff. I am kind of looking for a simple alternative like this.

Thanks,
Abishek

  • 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-24T18:43:49+00:00Added an answer on May 24, 2026 at 6:43 pm

    I think what you’re looking for is akin to a time-synchronized one-time password.

    A simplistic way to do this is to use the system time, rounded to the nearest, say, 6-second ‘pulse’ as a seed for a cryptographically secure random number generator (Java provides SecureRandom FWIW). Then, along with a pre-shared ‘secret’ put that through a one-way cryptographic hash (say, SHA256) to generate your alpha-numeric (hex or base64) string.

    If you don’t need to display/pass along the actual string, then I suppose you can skip the hash step and just use the shared secret and the synchronized time as the IV + key for a cipher applied to the communications stream on both ends.

    The obvious risk or complication with this approach is keeping the two system clocks in sync. If you use NTP or some other time synchronization protocol, then you have to secure that as well (otherwise you’re potentially open to a replay attack). Standard computer clocks are prone to drift (hence the 6-second window) and you have to secure them from tampering as well.

    (Disclaimer: I am not a security specialist so don’t think for a moment that what I’ve outlined about is completely secure/safe as is.)

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

Sidebar

Related Questions

Sorry if this is a dense question, but I'm looking to see if there
Looking to see if there's an existing method or application to increase display size
I am looking to see if there is an open source/free project that provides
I'm working with jQuery and looking to see if there is an easy way
Hi I'm looking but can't see Is there a way to change the caption
Looking to see what others do with 3rd party (vendor) java documents? Do they
I'm looking to see if there's a way to get the audio and video
Does the Java Interpreter support an Autoloader-Function or a possibility to extend his Looking
I'm looking to see if there is a method or tool to view how
I'm looking to see if there is a sample project, tutorial, contrib branch or

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.