Show / Hide Table of Contents

Class NameGenerator

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

Inheritance
Object
NameGenerator
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki.dll
Syntax
public class NameGenerator

Methods

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)

Declaration
public static Name GenerateFromDNString(string dnString, NameGeneratorTypePolicies typePolicy)
Parameters
Type Name Description
String dnString

The Distinguished Name string representation

NameGeneratorTypePolicies typePolicy

The type policy which will define which underlying types will be used to represent each value.

Returns
Type Description
Name

A X.509 name

GenerateFromModel(NameModel, NameGeneratorTypePolicies)

Generates a Name based on a Name model with filled fields

Declaration
public static Name GenerateFromModel(NameModel nameModel, NameGeneratorTypePolicies typePolicy)
Parameters
Type Name Description
NameModel nameModel
NameGeneratorTypePolicies typePolicy
Returns
Type Description
Name

GenerateFromOidsAndValues(NameValueCollection, NameGeneratorTypePolicies)

Declaration
public static Name GenerateFromOidsAndValues(NameValueCollection oidsAndValues, NameGeneratorTypePolicies typePolicy)
Parameters
Type Name Description
NameValueCollection oidsAndValues
NameGeneratorTypePolicies typePolicy
Returns
Type Description
Name

GenerateWithCommonNameOnly(String, NameGeneratorTypePolicies)

Generates a Name composed of only a single field of type Common Name (CN)

Declaration
public static Name GenerateWithCommonNameOnly(string commonName, NameGeneratorTypePolicies typePolicy = NameGeneratorTypePolicies.PrintableStringsOnly)
Parameters
Type Name Description
String commonName

The Common Name (CN) to be used to generate the X.509 name

NameGeneratorTypePolicies typePolicy

The type policy which will define which underlying type will be used to represent the CN value.

Returns
Type Description
Name

A X.509 name

Back to top Copyright © 2015-2020 Lacuna Software