     func authenticate(username: String, privateKey: String, publicKey: String, passphrase: String?) throws {
         let code = libssh2_userauth_publickey_fromfile_ex(cSession,
                                                           username,
-                                                          UInt32(username.characters.count),
+                                                          UInt32(username.count),
                                                           publicKey,
                                                           privateKey,
                                                           passphrase)

    init(rawSession: RawSession) throws {
        guard let cChannel = libssh2_channel_open_ex(rawSession.cSession,
                                                     RawChannel.session,
                                                     UInt32(RawChannel.session.characters.count),
                                                     RawChannel.windowDefault,
                                                     RawChannel.packetDefault, nil, 0) else {
                                                        throw LibSSH2Error.initializationError

    func exec(command: String) throws {
        let code = libssh2_channel_process_startup(cChannel,
                                                   RawChannel.exec,
                                                   UInt32(RawChannel.exec.count),
                                                   command,
                                                   UInt32(command.count))
        try LibSSH2Error.check(code: code)
    }
    
