Pular para o conteúdo principal

NameGenerator

Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class

Generates instances of the Name class (which represent X.509 names).

public class NameGenerator

Hierarquia: objectNameGenerator

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

NomeTipoDescrição
dnStringstringThe Distinguished Name string representation
typePolicyNameGeneratorTypePoliciesThe 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

NomeTipoDescrição
nameModelNameModel
typePolicyNameGeneratorTypePolicies

Retorno

Name


GenerateFromOidsAndValues(NameValueCollection, NameGeneratorTypePolicies)

public static Name GenerateFromOidsAndValues(NameValueCollection oidsAndValues, NameGeneratorTypePolicies typePolicy)

Parâmetros

NomeTipoDescrição
oidsAndValuesNameValueCollection
typePolicyNameGeneratorTypePolicies

Retorno

Name


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

NomeTipoDescrição
commonNamestringThe Common Name (CN) to be used to generate the X.509 name
typePolicyNameGeneratorTypePoliciesThe 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()