@Override
    public int read() throws IOException {
      byte[] oneByte = new byte[1];
      int ret = read(oneByte, 0, 1);
      if (ret == 1) {
        return oneByte[0] & 0xff;
      } else if (ret == -1) {
        return ret;
      } else {
        throw new IOException("Reading failed");
      }
    }
An implementation of the HKDF pseudorandom function, as given by RFC 5869.
java_src/src/main/java/com/google/crypto/tink/subtle/prf/HkdfStreamingPrf.java