AttributeFactory
Static class to manage X509 attributes
Constructors
new AttributeFactory()
new AttributeFactory():
AttributeFactory
Returns
Methods
create()
static
create(data
):Attribute
Returns X509 Attribute based on it's identifier
Parameters
• data: BufferSource
DER encoded buffer
Returns
Example
const attr = AttributeFactory.create(asnAttrRaw);
register()
static
register(id
,type
):void
Registers a new X509 Attribute class. If id already exists replaces it
Parameters
• id: string
Attribute identifier
• type: any
Attribute class
Returns
void
Example
AttributeFactory.register(asnPkcs9.id_pkcs9_at_challengePassword, ChallengePasswordAttribute);