Package net.i2p.data

Class SessionKey

  • All Implemented Interfaces:
    DataStructure
    Direct Known Subclasses:
    SessionKeyAndNonce

    public class SessionKey
    extends SimpleDataStructure
    Defines the SessionKey as defined by the I2P data structure spec. A session key is a 32 byte Integer. To create one with random data, use I2PAppContext.keyGenerator().generateSessionKey().
    Author:
    jrandom
    • Field Detail

      • INVALID_KEY

        public static final SessionKey INVALID_KEY
        A key with all zeroes in the data
    • Constructor Detail

      • SessionKey

        public SessionKey()
      • SessionKey

        public SessionKey​(byte[] data)
    • Method Detail

      • getPreparedKey

        public Object getPreparedKey()
        retrieve an internal representation of the session key, as known by the AES engine used. this can be reused safely
      • setPreparedKey

        public void setPreparedKey​(Object obj)