private static com.google.crypto.tink.proto.HkdfPrfParams getProtoParams(
      HkdfPrfParameters parameters) throws GeneralSecurityException {
    com.google.crypto.tink.proto.HkdfPrfParams.Builder builder =
        com.google.crypto.tink.proto.HkdfPrfParams.newBuilder()
            .setHash(toProtoHashType(parameters.getHashType()));
    if (parameters.getSalt() != null && parameters.getSalt().size() > 0) {
      builder.setSalt(ByteString.copyFrom(parameters.getSalt().toByteArray()));
    }
    return builder.build();
  }
Methods to serialize and parse {@link HkdfPrfKey} objects and {@link HkdfPrfParameters} objects.
java_src/src/main/java/com/google/crypto/tink/prf/internal/HkdfPrfProtoSerialization.java