Git Product home page Git Product logo

Comments (7)

simonbrowndotje avatar simonbrowndotje commented on May 18, 2024

Do you know if you have the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" installed?

from java.

pkuijpers avatar pkuijpers commented on May 18, 2024

I got the same problem, installing "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" from Oracle to <java_home>/lib/security didn't help.

Problem can be fixed by changing
@Test(expected = BadPaddingException.class)
to
@Test(expected = InvalidKeyException.class)
on the failing test.

I'm not familiar with the javax.crypto.Cipher class, but it doesn't seem unreasonable to throw an InvalidKeyException when an incorrect key size is used.

from java.

simonbrowndotje avatar simonbrowndotje commented on May 18, 2024

Which platform/OS are you running @pkuijpers?

from java.

simonbrowndotje avatar simonbrowndotje commented on May 18, 2024

OK, it seems that InvalidKeyException is thrown on Windows ... and BadPaddingException is thrown on Mac and Linux. Hmmm...

from java.

simonbrowndotje avatar simonbrowndotje commented on May 18, 2024

This (plus another failing test on Windows) has now been fixed.

from java.

pkuijpers avatar pkuijpers commented on May 18, 2024

I'm using a Mac with OS X El Capitan 10.11.3,
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

After the fix it's working now, but I did get the InvalidKeyException on a Mac, so still not sure why it's behaving this way...

from java.

simonbrowndotje avatar simonbrowndotje commented on May 18, 2024

Perhaps some variation between VM implementations? Not sure, odd nonetheless!

from java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.