         case 0: break; // No pad chars in this case
         case 2: s += "=="; break; // Two pad chars
         case 3: s += "="; break; // One pad char
-        default: println("Illegal base64url string!"); return nil
+        default: return nil
         }
         
         return NSData(base64EncodedString: s, options: options)!

            // verify the signature, a URL-safe base64 encoded string
            let hdr_body: String = parts[0] + "." + parts[1] // header & body of a JWT
            let data = hdr_body.dataUsingEncoding(NSUTF8StringEncoding)!

            if !self.verify(data, signature: sig, algorithm: self.alg, key: key) {
                return false  // TODO: populate NSError
            }
        }
        return true

        }
    }

    override func verify_signature(msg: NSData, signature: String, algorithm: String, key: NSData? = nil) -> Bool {
        if algorithm == "Ed25519" {
            if key == nil {
                // use the "kid" field as base64 key string as key if no key provided.
