This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Question About javax.crypto.Cipher

 
Ranch Hand
Posts: 152
  • 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: 10414
223
  • 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: 152
  • 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: 10414
223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How's it going Sam?
 
Sam Ritter
Ranch Hand
Posts: 152
  • 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: 152
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!