Ejemplo n.º 1
0
  public NorvosPreKeyStore(byte[] serialized) throws IOException {
    PreKeyStoreStructure struct = PreKeyStoreStructure.parseFrom(serialized);
    oneTimePreKeys = new CircularBuffer<PreKeyRecord>(Medium.MAX_VALUE);

    for (PreKeyStructure protoMessage : struct.getOneTimePreKeyList()) {
      PreKeyRecord key = new PreKeyRecord(protoMessage.getPreKeyRecord().toByteArray());
      oneTimePreKeys.add(protoMessage.getKeyId(), key);
    }
  }