 }
 
 public class PublicKey {
+    private let OID_ECPublicKey = "1.2.840.10045.2.1"
+    private let OID_RSAEncryption = "1.2.840.113549.1.1.1"
+
     var pkBlock: ASN1Object!
 
     init(pkBlock: ASN1Object) {

            return nil
        }
    }

    private let OID_ECPublicKey = "1.2.840.10045.2.1"
    private let OID_RSAEncryption = "1.2.840.113549.1.1.1"
}

public class X509Extension {

    }

    public var key: Data? {
        guard
            let algOid = algOid,
            let keyData = pkBlock.sub(1)?.value as? Data else {
                return nil
        }

        switch algOid {
        case OID_ECPublicKey:
            return keyData

