UTF-8 String Representation of Distinguished Names

https://tools.ietf.org/html/rfc2253

Constructors

  • Creates a new instance

    Parameters

    • data: string | BufferSource | JsonNameParams | Name
    • extraNames: IdOrName = {}

      Extra identifiers for name customization

    Returns Name

    Example

    const text = "URL=http://some.url.com, IP=192.168.0.1, GUID={8ee13e53-2c1c-42bb-8df7-39927c0bdbb6}";
    const name = new x509.Name(text, {
    "Email": "1.2.3.4.5.1",
    "IP": "1.2.3.4.5.2",
    "GUID": "1.2.3.4.5.3",
    });

Properties

asn: Name = ...

ASN.1 Name

extraNames: NameIdentifier = ...

Methods

  • Creates AsnName object from string

    Parameters

    • data: string

    Returns Name

  • Returns a list of string values filtered by specified id or name

    Parameters

    • idOrName: string

      ObjectIdentifier or string name

    Returns string[]

    Returns a list of strings. Returns an empty list if there are not any values for specified id/name.

  • Parameters

    • idOrName: string

    Returns null | string

  • Returns a SHA-1 thumbprint

    Parameters

    • Optional crypto: Crypto

      Crypto provider. Default is from CryptoProvider

    Returns Promise<ArrayBuffer>

  • Returns a thumbprint for specified mechanism

    Parameters

    • algorithm: AlgorithmIdentifier

      Hash algorithm

    • Optional crypto: Crypto

      Crypto provider. Default is from CryptoProvider

    Returns Promise<ArrayBuffer>

  • Returns Name in DER encoded format

    Returns ArrayBuffer

  • Returns string serialized Name

    Returns string

  • Returns true if text is ASCII otherwise false

    Parameters

    • text: string

      Text

    Returns boolean

  • Checks if a given string is a printable string. A printable string contains only printable ASCII characters.

    Parameters

    • text: string

      The string to be checked.

    Returns boolean

    True if the string is a printable string, false otherwise.

Generated using TypeDoc