Changeset 9e250bc


Ignore:
Timestamp:
Nov 26, 2010 12:32:44 AM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1197a5c
Parents:
ec51ea6
Message:

fix hashcode and javadocs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/Payload.java

    rec51ea6 r9e250bc  
    2020 * standard encryption wrapping, as defined by the I2P data structure spec.
    2121 *
     22 * This is used mostly in I2CP, where we used to do end-to-end encryption.
     23 * Since we don't any more, you probably just want to use the
     24 * get/set EncryptedData methods.
     25 *
    2226 * @author jrandom
    2327 */
     
    3337     * Retrieve the unencrypted body of the message. 
    3438     *
     39     * Deprecated.
     40     * Unless you are doing encryption, use getEncryptedData() instead.
     41     *
    3542     * @return body of the message, or null if the message has either not been
    3643     *          decrypted yet or if the hash is not correct
     
    4451     * yet.
    4552     *
     53     * Deprecated.
     54     * Unless you are doing encryption, use setEncryptedData() instead.
    4655     */
    4756    public void setUnencryptedData(byte[] data) {
     
    4958    }
    5059
     60    /** the real data */
    5161    public byte[] getEncryptedData() {
    5262        return _encryptedData;
    5363    }
    5464
     65    /** the real data */
    5566    public void setEncryptedData(byte[] data) {
    5667        _encryptedData = data;
     
    101112    @Override
    102113    public int hashCode() {
    103         return DataHelper.hashCode(_unencryptedData);
     114        return DataHelper.hashCode(_encryptedData != null ? _encryptedData : _unencryptedData);
    104115    }
    105116   
Note: See TracChangeset for help on using the changeset viewer.