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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:21:28+00:00 2026-05-31T20:21:28+00:00

Does Spongy Castle Provide the implementation of SHA1PRNG Algorithm? I am asking this because

  • 0

Does Spongy Castle Provide the implementation of “SHA1PRNG” Algorithm? I am asking this because Bouncy Castle doesn’t seem to provide implementation of “SHA1PRNG” Algorithm.

  • 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-31T20:21:30+00:00Added an answer on May 31, 2026 at 8:21 pm

    It maybe too late for this answer, however, here is an example of the implementation:

    SpongyCastle should be the same as BountyCastle, just usable in Android.

    import java.security.SecureRandom;
    import java.security.Security;
    
    
    public class SHA1PRNG {
     //here i swapped out the bountycastle provider and used the spongycatle
       static {
          Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
    }
    
    public static void main(String[] args) throws Exception {
    
        SecureRandom rng = SecureRandom.getInstance("SHA1PRNG");
        rng.setSeed(711);
    
        int numberToGenerate = 999;
        byte randNumbers[] = new byte[numberToGenerate];
    
        rng.nextBytes(randNumbers);
        for(int j=0; j<numberToGenerate; j++) {
            System.out.print(randNumbers[j] + " ");
        }
    
    }
    }
    

    From:
    http://www.java2s.com/Code/Java/Security/SecureRandomSHA1PRNG.htm

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

Sidebar

Related Questions

Does anyone know how to make this code stop the knob from rotating past
Does python provide a way to find the children of a child process spawned
Does this line of Perl really do anything? $variable =~ s/^(\d+)\b/$1/sg; The only thing
Does doxygen doesn't work properly on python script with a shebang? I tried one
Does anyone know why this bean is getting instantiated multiple times? I only ever
Does WPF provide a framework for handling documents, similar to how MFC's Document/View? In
Does anyone know a good algorithm for perform clustering on both discrete and continuous
Does the Windows API provide a way to notify a running Delphi application in
Does anyone know of a simple implementation of a checked combobox in WinForms? I
Does $this->db->insert_batch(); insert with 1 table connection or does it insert each row separately

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.