NameGenerator
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class
Generates instances of the Name class (which represent X.509 names).
public class NameGenerator
Hierarquia: object → NameGenerator
Construtores
NameGenerator()
public NameGenerator()
Métodos
GenerateFromDNString(string, NameGeneratorTypePolicies)
Generates a Name based on a Distinguished Name string representation such as "C=US, O=Acme Inc., CN=John Smith" (as defined by RFC 4514)
public static Name GenerateFromDNString(string dnString, NameGeneratorTypePolicies typePolicy)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
dnString | string | The Distinguished Name string representation |
typePolicy | NameGeneratorTypePolicies | The type policy which will define which underlying types will be used to represent each value. |
Retorno
Name — A X.509 name
GenerateFromModel(NameModel, NameGeneratorTypePolicies)
Generates a Name based on a Name model with filled fields
public static Name GenerateFromModel(NameModel nameModel, NameGeneratorTypePolicies typePolicy)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
nameModel | NameModel | |
typePolicy | NameGeneratorTypePolicies |
Retorno
GenerateFromOidsAndValues(NameValueCollection, NameGeneratorTypePolicies)
public static Name GenerateFromOidsAndValues(NameValueCollection oidsAndValues, NameGeneratorTypePolicies typePolicy)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
oidsAndValues | NameValueCollection | |
typePolicy | NameGeneratorTypePolicies |
Retorno
GenerateWithCommonNameOnly(string, NameGeneratorTypePolicies)
Generates a Name composed of only a single field of type Common Name (CN)
public static Name GenerateWithCommonNameOnly(string commonName, NameGeneratorTypePolicies typePolicy = NameGeneratorTypePolicies.PrintableStringsOnly)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
commonName | string | The Common Name (CN) to be used to generate the X.509 name |
typePolicy | NameGeneratorTypePolicies | The type policy which will define which underlying type will be used to represent the CN value. |
Retorno
Name — A X.509 name
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()