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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:27:39+00:00 2026-05-24T22:27:39+00:00

Apparently Spongy Castle is the Android alternative to using a full version of Bouncy

  • 0

Apparently Spongy Castle is the Android alternative to using a full version of Bouncy Castle.

However, on importing the jar I’m getting all kinds of “cannot be resolved” errors because it relies on packages not included with Android, primarily javax.mail, javax.activation, and javax.awt.datatransfer.

So what’s the best way around this? Responses to this question and this indicate those packages shouldn’t be used at all, and this popular question doesn’t even consider finding a way to get AWT back. So how is Spongy Castle relying on them? People are using Spongy Castle, right?

  • 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-24T22:27:40+00:00Added an answer on May 24, 2026 at 10:27 pm

    These are two very simple examples of how to include Spongy Castle in a project:

    • github.com/rtyley/spongycastle-eclipse – Eclipse
    • github.com/rtyley/toy-android-ssh-agent – Maven

    Since v1.47, Spongy Castle has been split into separate sub-jars that exactly mirror the matching Bouncy Castle artifacts (eg sc-light-jdk15on.jar, scpg-jdk15on.jar, etc), and it is important to ensure you include all the Spongy Castle jars required for what you’re doing.

    Full information on dependencies can be found at:

    http://rtyley.github.com/spongycastle/#downloads

    At minimum you’ll need the sc-light-jdk15on.jar (the base lightweight-API implementation) and probably scprov-jdk15on.jar (the JCE wrapper around the lightweight-API). If you’re using Maven then all this dependency-management stuff is taken care of for you.

    The problematic dependencies you describe on javax.mail, javax.activation, etc, indicate that you might have chosen an incorrect jar (e.g. the every-single-library-component one, rather than the ‘core provider’ one) – as the scprov-jdk15on jar definitely doesn’t have any of those weird dependencies, and runs happily on Android.

    (disclaimer, I’m the maintainer of Spongy Castle, but I’ve had plenty of success reports from other users too!)

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

Sidebar

Related Questions

Apparently an alternative method (to just using the extended Euclidean algorithm) of obtaining the
Apparently using the URL is no good - why is this the case, and
Apparently I've done something I'm not aware of All my classes now have warnings
Apparently the latest version of iOS is 5.1. I have been developing an iPad
Apparently I can't move files on different volumes using Directory.Move. I have read that
Apparently John Chambers added Reference Classes to R in version 2.12. There doesn't appear
Apparently external storage on Android (referred to by Environment.getExternalStorageDirectory) doesn't have to be an
Apparently there is no generic version of a HybridDictionary . Why is this? I
Apparently, Microsoft has not yet made WebGL work in Internet Explorer by default. Plus,
Apparently ASP.NET doesn't allow data-binding to dynamic objects . Major bummer, because I could

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.