ASN1ObjectIdentifier.fromName constructor
ASN1ObjectIdentifier.fromName(
- String name
Creates an ASN1ObjectIdentifier entity from the given name
.
Example:
var oi = ASN1ObjectIdentifier.fromName('ecdsaWithSHA256');
Throws an UnsupportedObjectIdentifierException if the given name
is not supported
Implementation
ASN1ObjectIdentifier.fromName(String name) {
tag = ASN1Tags.OBJECT_IDENTIFIER;
var identifier = ObjectIdentifiers.getIdentifierByName(name);
if (identifier == null) {
throw UnsupportedObjectIdentifierException(name);
}
objectIdentifierAsString = identifier['identifierString'] as String?;
readableName = identifier['readableName'] as String?;
objectIdentifier = identifier['identifier'] as List<int>?;
}