public static KeyTemplate.OutputPrefixType getOutputPrefixType(KeyTemplate t)
      throws GeneralSecurityException {
    return prefixFromProto(toProto(t).getOutputPrefixType());
  }
KeyTemplateProtoConverter converts KeyTemplate to and from the binary proto format.
java_src/src/main/java/com/google/crypto/tink/internal/KeyTemplateProtoConverter.java