org.bouncycastle.asn1.x509.sigi

## Class NameOrPseudonym

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Encodable
  - - org.bouncycastle.asn1.x509.sigi.NameOrPseudonym

All Implemented Interfaces:
  ASN1Choice, DEREncodable

    public class NameOrPseudonym
    extends ASN1Encodable
    implements ASN1Choice

Structure for a name or pseudonym.

           NameOrPseudonym ::= CHOICE {
                surAndGivenName SEQUENCE {
                  surName DirectoryString,
                  givenName SEQUENCE OF DirectoryString
             },
                pseudonym DirectoryString
           }

See Also:
  `PersonalData`

### Field Summary

### Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

`BER, DER`

### Constructor Summary

Constructors
Constructor and Description
`NameOrPseudonym(DirectoryString pseudonym)` Constructor from DERString.
`NameOrPseudonym(DirectoryString surname, ASN1Sequence givenName)` Constructor from a given details.
`NameOrPseudonym(java.lang.String pseudonym)` Constructor from a given details.

### Method Summary

Methods
`DirectoryString[]` `getGivenName()`
`static NameOrPseudonym` `getInstance(java.lang.Object obj)`
`DirectoryString` `getPseudonym()`
`DirectoryString` `getSurname()`
`DERObject` `toASN1Object()` Produce an object suitable for an ASN1OutputStream.

### Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

`equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NameOrPseudonym

    public NameOrPseudonym(DirectoryString pseudonym)

Constructor from DERString.

The sequence is of type NameOrPseudonym:

           NameOrPseudonym ::= CHOICE {
                surAndGivenName SEQUENCE {
                  surName DirectoryString,
                  givenName SEQUENCE OF DirectoryString
             },
                pseudonym DirectoryString
           }

Parameters:
  `pseudonym` - pseudonym value to use.

#### NameOrPseudonym

    public NameOrPseudonym(java.lang.String pseudonym)

Constructor from a given details.

Parameters:
  `pseudonym` - The pseudonym.

#### NameOrPseudonym

    public NameOrPseudonym(DirectoryString surname,
                   ASN1Sequence givenName)

Constructor from a given details.

Parameters:
  `surname` - The surname.
  `givenName` - A sequence of directory strings making up the givenName

### Method Detail

#### getInstance

    public static NameOrPseudonym getInstance(java.lang.Object obj)

#### getPseudonym

    public DirectoryString getPseudonym()

#### getSurname

    public DirectoryString getSurname()

#### getGivenName

    public DirectoryString[] getGivenName()

#### toASN1Object

    public DERObject toASN1Object()

Produce an object suitable for an ASN1OutputStream.

Returns:

           NameOrPseudonym ::= CHOICE {
                surAndGivenName SEQUENCE {
                  surName DirectoryString,
                  givenName SEQUENCE OF DirectoryString
             },
                pseudonym DirectoryString
           }

Specified by:
  `toASN1Object` in class `ASN1Encodable`
Returns:
  a DERObject