Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ASN1Decoder/ASN1Identifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ public class ASN1Identifier: CustomStringConvertible {
}

public func typeClass() -> Class {
for tc in [Class.application, Class.contextSpecific, Class.private] where (rawValue & tc.rawValue) == tc.rawValue {
return tc
}
return .universal
return Class(rawValue: rawValue & 0xC0) ?? .universal
}

public func isPrimitive() -> Bool {
Expand Down