Changeset e973185 for core


Ignore:
Timestamp:
May 14, 2017 11:57:48 AM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ac788d9
Parents:
040af11
Message:

Crypto: Initialize array earlier (ticket #1989)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/CryptixRijndael_Algorithm.java

    r040af11 re973185  
    570570        int[] tk; // new int[KC];
    571571        int i, j;
    572        
     572        // the return value
     573        Object[] sessionKey;
     574
    573575        if (keyData == null) {
    574576            Ke = new int[ROUNDS + 1][BC];
    575577            Kd = new int[ROUNDS + 1][BC];
    576578            tk = new int[KC];
     579            sessionKey = new Object[] { Ke, Kd};
    577580        } else {
    578581            Ke = keyData.Ke;
    579582            Kd = keyData.Kd;
    580583            tk = keyData.tk;
     584            sessionKey = keyData.key;
    581585        }
    582586
     
    637641            }
    638642        }
    639         // assemble the encryption (Ke) and decryption (Kd) round keys into
    640         // one sessionKey object
    641         Object[] sessionKey;
    642         if (keyData == null)
    643             sessionKey = new Object[] { Ke, Kd};
    644         else
    645             sessionKey = keyData.key;
    646         //if (_RDEBUG) trace(_OUT, "makeKey()");
    647643        return sessionKey;
    648644    }
Note: See TracChangeset for help on using the changeset viewer.