Differences From Artifact [94a9ef2a4a]:
- File src/OFASN1ObjectIdentifier.m — part of check-in [cfed9215e4] at 2018-10-14 22:41:52 on branch trunk — Add ASN.1 Object Identifier type (user: js, size: 3097) [annotate] [blame] [check-ins using]
To Artifact [84db523991]:
- File
src/OFASN1ObjectIdentifier.m
— part of check-in
[b1944fd052]
at
2018-10-27 13:01:38
on branch trunk
— Do not subclass OFASN1Value
The reason for this is that OFASN1Value requires an initializer for DER
encoding, however, it might be beneficial to create an ASN.1 type
without providing DER encoding for it. (user: js, size: 3393) [annotate] [blame] [check-ins using]
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | + + + + + - + - - - - - + + - - - + + + - - + + | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" @implementation OFASN1ObjectIdentifier @synthesize subidentifiers = _subidentifiers; - (instancetype)init { OF_INVALID_INIT_METHOD } - (instancetype)initWithTagClass: (of_asn1_tag_class_t)tagClass tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { |
︙ | |||
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | + + + + + + + + + + + + + + + + + + + + | - (void)dealloc { [_subidentifiers release]; [super dealloc]; } - (bool)isEqual: (id)object { OFASN1ObjectIdentifier *objectIdentifier; if (![object isKindOfClass: [OFASN1ObjectIdentifier class]]) return false; objectIdentifier = object; if (![objectIdentifier->_subidentifiers isEqual: _subidentifiers]) return false; return true; } - (uint32_t)hash { return [_subidentifiers hash]; } - (OFString *)description { return [OFString stringWithFormat: @"<OFASN1ObjectIdentifier: %@>", [_subidentifiers componentsJoinedByString: @"."]]; } @end |