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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:36:11+00:00 2026-06-18T18:36:11+00:00

The android developer’s guide on securerandom says Supported Algorithms SHA1PRNG: Based on SHA-1. **Not

  • 0

The android developer’s guide on securerandom says

Supported Algorithms

SHA1PRNG: Based on SHA-1. **Not guaranteed to be compatible with the SHA1PRNG algorithm on the reference implementation.**
The default algorithm is defined by the first SecureRandomSpi provider<br> found in the VM's installed security providers. Use Security to install custom SecureRandomSpi providers.

And true to this this when seeded with the same value, the sequence in java and android are different. How do I make android use the sha11prng implementation same as the one used in java?

  • 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-18T18:36:13+00:00Added an answer on June 18, 2026 at 6:36 pm

    In general you need the SecureRandomSpi implementation of your desktop Java and include it into your Android project.

    By extending the standard SecureRandom implementation you can make use of the protected constructor that allows to specify the SecureRandomSpi directly.

    However using the standard/Oracle Java SHA1PRNG implementation is not that easy as the source code is not part of the SDK. IMHO the much simpler way is getting the Android sources from AOSP end extract the SHA1PRNG implementation used on Android. This would result is the opposite way as you asked for.

    BTW: The Android implementation is the one from Apache Harmony project. The main implementation is in the file org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl.

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

Sidebar

Related Questions

Quoting the Android developer guide found here here its says Additionally, the Andoid UI
The Android Developer documentation does not mention whether the method below (and similar ones)
Extreme Android developer newbie here...well, new to Android development, not development in general. I
According to Android Developer Reference uptimeMillis() returns the number of milliseconds since boot, not
fairly new Android developer here. I've come across a strange problem that I'm not
From the Android developer web link: http://developer.android.com/reference/android/content/Intent.html , you can find that it says
Dialogs @ Android Developer says to avoid ProgressDialog to indicate loading, and instead, to
The Android Developer guide has a decent section on the use of Fragments .
I am android developer.I am not aware of ant in android .I have downloaded
The Android developer guide (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html) states: `You can implement your tab content in one

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.