That's awesome, thanks, Les! On Wed, Mar 31, 2010 at 9:56 PM, Les Hazlewood <[email protected]>wrote:
> I finally figured this out - our Cipher interface from a behavioral > standpoint is just fine; all Ciphers should be able to do what the > interface specifies, but I need to add some streaming methods in there > for Stream ciphers (or create a StreamCipher interface). > > Side note: interestingly enough JDK block ciphers can be used as > stream ciphers if the Cipher's Feedback Mode size is changed to 8 bits > (1 byte). If you haven't worked with the JCE and don't know what this > means, don't worry - it doesn't change the architectural approach :). > > The _implementation_ of our Cipher interface can be stateless or > stateful and we can support both types of implementations if > necessary. I'll run through the solution today and tomorrow, but I > think it will be nice and solid for 1.0, and without taking up much > time. I should have it wrapped up by tomorrow. > > - Les > > On Wed, Mar 31, 2010 at 2:35 PM, Les Hazlewood <[email protected]> > wrote: > > I think I'm going to go with StatelessCipher for now so I don't > > prolong the release any more than I have to. If anyone feels > > differently, please comment! > > > > On Wed, Mar 31, 2010 at 12:45 PM, Kalle Korhonen > > <[email protected]> wrote: > >> On Wed, Mar 31, 2010 at 12:03 PM, Les Hazlewood <[email protected]> > wrote: > >>> Refactoring things now, so close to 1.0 would probably delay things > >>> another few days. I think maybe instead, it would be better to rename > >>> the existing Cipher interface to StatelessCipher and keep what we have > >>> in place. Then, when we have the time to work out a cleaner > >>> abstraction, we can then create a 'real' Cipher interface that can > >>> handle stateful operations in a clean manner. > >>> Or maybe I just spend a few days and put together a more robust > >>> permanent solution. > >> > >> I could easily see it might take more than just a few days, but if you > >> think you could satisfactorily refactor it in a few days, I'd say go > >> for it but time-box it. If at any point you hit a roadblock or you are > >> unsure if the refactored interface would cover the new use cases > >> without causing problems in the existing implementation, you could > >> drop it and leave it for follow-up releases. StatelessCipher is a good > >> fallback. > >> > >> Kalle > >> > > >
