classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: fix CipherInputStream


From: Casey Marshall
Subject: [cp-patches] FYI: fix CipherInputStream
Date: Fri, 6 Jan 2006 23:02:54 -0800

This should fix bug 25699. It basically reimplements a lot of CipherInputStream from scratch, because the old version was trying to be too clever and optimized.

2006-01-06  Casey Marshall  <address@hidden>

        PR classpath/25699
        * javax/crypto/CipherInputStream.java (logger): new constant.
        (cipher): make final.
        (outLength, inBuffer, inLength): removed.
        (isStream): make final.
        (VIRGIN, LIVING, DYING, DEAD, state): removed.
        (eof): new field.
        (<init>): call `super,' not `this;' remove `inBuffer' and
        `outBuffer' initialization; init `eof;' add debug logging.
        (<init>): call `this' with a new null cipher.
        (available): fix javadoc to reflect the real semantics; if we
        don't have a buffer, call `nextBlock.'
        (close): synchronize.
        (read): synchronize; fix testing for buffered data.
        (read): synchronize; add `skip' semantics if first argument is
        `null;' decrypt stream cipher data only if there is any; fix tests
        for buffered data.
        (skip): stop using `available' to see how many data are buffered.
        (nextBlock): simplify to use cipher-allocated output buffers
        instead of internally allocated ones.

Committed.

Attachment: cis.patch.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]