Class SessionState

java.lang.Object
it.auties.whatsapp.model.signal.session.SessionState
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject

public final class SessionState extends Object implements it.auties.protobuf.model.ProtobufMessage
  • Field Details

    • version

      private final int version
    • registrationId

      private final int registrationId
    • baseKey

      private final byte[] baseKey
    • remoteIdentityKey

      private final byte[] remoteIdentityKey
    • chains

      private final ConcurrentHashMap<String,SessionChain> chains
    • rootKey

      private byte[] rootKey
    • pendingPreKey

      private SessionPreKey pendingPreKey
    • ephemeralKeyPair

      private SignalKeyPair ephemeralKeyPair
    • lastRemoteEphemeralKey

      private byte[] lastRemoteEphemeralKey
    • previousCounter

      private int previousCounter
    • closed

      private boolean closed
  • Constructor Details

    • SessionState

      public SessionState(int version, int registrationId, byte[] baseKey, byte[] remoteIdentityKey, ConcurrentHashMap<String,SessionChain> chains, byte[] rootKey, SessionPreKey pendingPreKey, SignalKeyPair ephemeralKeyPair, byte[] lastRemoteEphemeralKey, int previousCounter, boolean closed)
  • Method Details

    • hasChain

      public boolean hasChain(byte[] senderEphemeral)
    • findChain

      public Optional<SessionChain> findChain(byte[] senderEphemeral)
    • addChain

      public SessionState addChain(byte[] senderEphemeral, SessionChain chain)
    • removeChain

      public void removeChain(byte[] senderEphemeral)
    • hasPreKey

      public boolean hasPreKey()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • contentEquals

      public boolean contentEquals(int version, byte[] baseKey)
    • version

      public int version()
    • registrationId

      public int registrationId()
    • baseKey

      public byte[] baseKey()
    • remoteIdentityKey

      public byte[] remoteIdentityKey()
    • rootKey

      public byte[] rootKey()
    • pendingPreKey

      public SessionPreKey pendingPreKey()
    • ephemeralKeyPair

      public SignalKeyPair ephemeralKeyPair()
    • lastRemoteEphemeralKey

      public byte[] lastRemoteEphemeralKey()
    • previousCounter

      public int previousCounter()
    • closed

      public boolean closed()
    • rootKey

      public SessionState rootKey(byte[] rootKey)
    • pendingPreKey

      public SessionState pendingPreKey(SessionPreKey pendingPreKey)
    • ephemeralKeyPair

      public SessionState ephemeralKeyPair(SignalKeyPair ephemeralKeyPair)
    • lastRemoteEphemeralKey

      public SessionState lastRemoteEphemeralKey(byte[] lastRemoteEphemeralKey)
    • previousCounter

      public SessionState previousCounter(int previousCounter)
    • closed

      public SessionState closed(boolean closed)
    • chains

      public Map<String,SessionChain> chains()