---
title: "NameGeneratorTypePolicies"
description: "Namespace: Lacuna.Pki"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.Pki/NameGeneratorTypePolicies"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# NameGeneratorTypePolicies

**Namespace:** `Lacuna.Pki`  
**Assembly:** `Lacuna.Pki`  
_Enum_

Defines which underlying types will be used to represent each value in a Name object generated by the NameGenerator class.

```csharp
public enum NameGeneratorTypePolicies
```

## Membros

| Nome | Descrição |
|---|---|
| `PrintableStringsOnly` | Use only the PrintableString type for all values. If a value that cannot be represented as a PrintableString is found, an exception is thrown. |
| `Utf8StringsOnly` |  |
| `Utf8StringsWhenNecessary` | Use the PrintableString type for the values that can be expressed as such, Utf8String otherwise. |
| `Utf8StringsWhenPossible` | Use UTF-8 string for Name attributes that allow UTF-8 encoding. If not allowed, try to convert to PrintableString or IA5String, depending on the attribute rule. If lossless conversion is not possible, throws FormatException. |
