I am trying to run a jar file and I get this error.  Error encrypting/decrypting file net.codejava.crypto.CryptoException: Error encrypting/decrypting file Caused by: java.security.InvalidKeyException: Invalid AES key length: 17 bytes at net.codejava.crypto.CryptoUtils.doCrypto(CryptoUtils.java:57) at net.codejava.crypto.CryptoUtils.encrypt(CryptoUtils.java:27) at net.codejava.crypto.CryptoUtilsTest.main(CryptoUtilsTest.java:18) Caused by: java.security.InvalidKeyException: Invalid AES key length: 17 bytes at java.base/com.sun.crypto.provider.AESCrypt.makeSessionKey(AESCrypt.java:1329) at java.base/com.sun.crypto.provider.AESCrypt.init(AESCrypt.java:1053) at java.base/com.sun.crypto.provider.ElectronicCodeBook.init(ElectronicCodeBook.java:97) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:481) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:399) at java.base/com.sun.crypto.provider.AESCipher.engineInit(AESCipher.java:311) at java.base/javax.crypto.Cipher.implInit(Cipher.java:872) at java.base/javax.crypto.Cipher.chooseProvider(Cipher.java:934) at java.base/javax.crypto.Cipher.init(Cipher.java:1313) at java.base/javax.crypto.Cipher.init(Cipher.java:1246) at net.codejava.crypto.CryptoUtils.doCrypto(CryptoUtils.java:40) ... 2 more what do i do? It is working perfectly fine in my workspace but showing errors when I run the actual jar file.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I am trying to run a jar file and I get this error.  Error encrypting/decrypting file net.codejava.crypto.CryptoException: Error encrypting/decrypting file Caused by: java.security.InvalidKeyException: Invalid AES key length: 17 bytes at net.codejava.crypto.CryptoUtils.doCrypto(CryptoUtils.java:57) at net.codejava.crypto.CryptoUtils.encrypt(CryptoUtils.java:27) at net.codejava.crypto.CryptoUtilsTest.main(CryptoUtilsTest.java:18) Caused by: java.security.InvalidKeyException: Invalid AES key length: 17 bytes at java.base/com.sun.crypto.provider.AESCrypt.makeSessionKey(AESCrypt.java:1329) at java.base/com.sun.crypto.provider.AESCrypt.init(AESCrypt.java:1053) at java.base/com.sun.crypto.provider.ElectronicCodeBook.init(ElectronicCodeBook.java:97) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:481) at java.base/com.sun.crypto.provider.CipherCore.init(CipherCore.java:399) at java.base/com.sun.crypto.provider.AESCipher.engineInit(AESCipher.java:311) at java.base/javax.crypto.Cipher.implInit(Cipher.java:872) at java.base/javax.crypto.Cipher.chooseProvider(Cipher.java:934) at java.base/javax.crypto.Cipher.init(Cipher.java:1313) at java.base/javax.crypto.Cipher.init(Cipher.java:1246) at net.codejava.crypto.CryptoUtils.doCrypto(CryptoUtils.java:40) ... 2 more what do i do? It is working perfectly fine in my workspace but showing errors when I run the actual jar file.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education