This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Question About javax.crypto.Cipher

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to learn about the Cipher library and discovered something that to me seems strange. Playing around I inadvertently encrypted my encryption key. I then discovered that if I try to decrypt that, the result is null (no exception thrown). In other words decrypting the encryption key resulted in a null decrypted string. I don't know why that would be a practical thing to do but from an academic standpoint, would one expect that to be normal behavior? Logically I don't see why that would happen. A string is a string. TIA.
 
Saloon Keeper
Posts: 10650
227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you give us a small program that we can compile and run that illustrates what you've described?
 
Sam Ritter
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I will when I get back to that.
 
Stephan van Hulst
Saloon Keeper
Posts: 10650
227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How's it going Sam?
 
Sam Ritter
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't had a chance to get back to it yet.
 
Sam Ritter
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I finally returned to this project. Fortunately (for me), I had to make some seemingly unrelated changes and can no longer reproduce the problem. Obviously those changes were not entirely unrelated somehow but it is not worth pursuing at this point.
 
We're all out of roofs. But we still have tiny ads:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!