AttributeFactory
Static class to manage X509 attributes
Constructors
Constructor
new AttributeFactory():
AttributeFactory
Returns
AttributeFactory
Methods
create()
staticcreate(data):Attribute
Returns X509 Attribute based on it's identifier
Parameters
data
BufferSource
DER encoded buffer
Returns
Example
const attr = AttributeFactory.create(asnAttrRaw);
register()
staticregister(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);