Re: [Codec] clearing input byte array vs not

2023-08-12 Thread Gary Gregory
I tend to agree and that's how I would write a new API today, but this is what we have had for years. I am guessing the behavior came from the C implementation (FreeBSD). Mark, any further thoughts? We do not have a concensus atm. Gary On Sat, Aug 12, 2023, 4:09 PM Elliotte Rusty Harold wrot

Re: [Codec] clearing input byte array vs not

2023-08-12 Thread Elliotte Rusty Harold
I still think the input byte array should not be cleared, period. Clearing is a separate operation that should be performed by the caller. On Sat, Aug 12, 2023 at 12:52 PM Gary Gregory wrote: > > Coming back around to this now that Mark fixed the mailing list noise. > > Git master now documents t

Re: [Codec] clearing input byte array vs not

2023-08-12 Thread Gary Gregory
Coming back around to this now that Mark fixed the mailing list noise. Git master now documents the existing clearing behavior as suggested by Mark in https://lists.apache.org/thread/cyrpgsqx4lnjlsf3frqwfo5pvbmpcycr Next, is how to document or change Crypt.crypt(byte[], String): The method clears

Re: [Codec] clearing input byte array vs not

2023-08-09 Thread Gary Gregory
The class comment says the code originates in FreeBSD C. Gary On Wed, Aug 9, 2023, 6:03 PM Elliotte Rusty Harold wrote: > This makes sense to me. The existing behavior seems surprising and > incorrect. Is there a reason for it? > > On Wed, Aug 9, 2023 at 6:53 PM Gary Gregory > wrote: > > > > H

Re: [Codec] clearing input byte array vs not

2023-08-09 Thread Elliotte Rusty Harold
This makes sense to me. The existing behavior seems surprising and incorrect. Is there a reason for it? On Wed, Aug 9, 2023 at 6:53 PM Gary Gregory wrote: > > Hi all, > > Any thoughts on https://github.com/apache/commons-codec/pull/197 > > Gary -- Elliotte Rusty Harold elh...@ibiblio.org ---

Re: [Codec] clearing input byte array vs not

2023-08-09 Thread Gary D. Gregory
Done and done in git master. Next, is how to document or change org.apache.commons.codec.digest.Crypt.crypt(byte[], String): The method clears the input byte array for all input types _except_ when calling UnixCrypt [1]. I could: (1) Document the inconsistency (right now, I left it unsaid) (2)

Re: [Codec] clearing input byte array vs not

2023-08-09 Thread Mark Thomas
Reject it. And document the existing behavior. Mark On 09/08/2023 19:52, Gary Gregory wrote: Hi all, Any thoughts on https://github.com/apache/commons-codec/pull/197 Gary - To unsubscribe, e-mail: dev-unsubscr...@commons.

[Codec] clearing input byte array vs not

2023-08-09 Thread Gary Gregory
Hi all, Any thoughts on https://github.com/apache/commons-codec/pull/197 Gary