wood burning stoves 2.0*
The moose likes Java in General and the fly likes Using Cipher on 2 strings in Succession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Cipher on 2 strings in Succession" Watch "Using Cipher on 2 strings in Succession" New topic
Author

Using Cipher on 2 strings in Succession

Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 210
Can doFinal be invoked on 2 separate strings after a single call to init? In other words is this sequence valid?
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1044
    
  10

Yes - as long as no exception is thrown.
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 210
Thanks. It seemed to work but I just wanted to make sure.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Cipher on 2 strings in Succession