 }
 
 extension Base64 {
-    public static func encode(convertible: DataConvertible) throws -> String {
+    public static func encode(_ convertible: DataConvertible) throws -> String {
         return try encode(convertible.data)
     }
 }
        return decoded
    }

	public static func encode(data: Data, specialChars: String = "+/", paddingChar: Character? = "=") throws -> String {
        let base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" + specialChars
        var encoded: String = ""

        func appendCharacterFromBase(character: Int) {
            encoded.append(base64[base64.startIndex.advanced(by: character)])
        }

        func byte(index: Int) -> Int {
            return Int(data[index])
        }


            unreadBytes += 1
        }

        func byte(_ index: Int) -> Int {
            return Int(Array(string.utf8)[index])
        }

