@Override
public List<Index> getIndices() throws NigoriCryptographyException, IOException,
UnauthorisedException {
try {
GetIndicesResponse getResponse =
protocol.getIndices(MessageLibrary.getIndicesRequestAsProtobuf(
keyManager.getServerName(), keyManager.signer()));
if (getResponse == null) {
return null;
}
List<ByteString> indices = getResponse.getIndicesList();
List<Index> answer = new ArrayList<Index>(indices.size());
for (ByteString index : indices) {
answer.add(new Index(keyManager.decrypt(index.toByteArray())));
}
return answer;