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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:07:52+00:00 2026-06-03T05:07:52+00:00

Does anyone know what’s wrong with this code? Cipher cipher = Cipher.getInstance(AES/ECB128/PKCS5Padding, SunJCE); Algorithm:

  • 0

Does anyone know what’s wrong with this code?

Cipher cipher = Cipher.getInstance("AES/ECB128/PKCS5Padding", "SunJCE");
  • Algorithm: AES
  • Mode of operation: ECB (with 128 appended to specify the block size)
  • PaddingSchemce: PKCS5Padding

This seems correct to me but it keeps throwing the “No such algorithm” exception during instantiation.

  • 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-03T05:07:54+00:00Added an answer on June 3, 2026 at 5:07 am

    With nothing but the stock JDK in my classpath, I ran this code snippet and grepped for AES in the output:

    for (Provider provider: Security.getProviders()) {
      System.out.println(provider.getName());
      for (String key: provider.stringPropertyNames())
        System.out.println("\t" + key + "\t" + provider.getProperty(key));
    }
    

    I saw this line:

        Cipher.AES SupportedPaddings    NOPADDING|PKCS5PADDING|ISO10126PADDING
    

    That suggests to me that your padding is supported.

    I also saw this line:

        Cipher.AES SupportedModes       ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128
    

    I notice that ECB appears here, but ECB128 does not, so I wonder if that is the issue. I’m going to confess I don’t know enough to know if this information is on the right track or not.

    Edited to add:
    I am able to call Cipher.getAlgorithm(“AES/ECB/PKCS5Padding”) with ECB, instead of ECB128. It looks to me like with ECB you can’t specify the block size, at least with what is available here. Not sure if this is sufficient for you or not.

    • 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 anyone know how I can bring this (see code) image to the background?
Does anyone know where code can be found for Metaphone 3 matching for T-SQL
Does anyone know why 2 /// 2 is 2 in Javascript? What is this
Does anyone know why this bean is getting instantiated multiple times? I only ever
Does anyone know how I could implement I predicate doing what this one does
Does anyone know how can I replace this 2 symbol below from the string
Does anyone know how I can, in platform-independent C++ code prevent an object from
Does anyone know why when I list a blobs in a directory like this:
Does anyone know, what an XMLHttpRequest enables a web page to do, which cannot

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.