AES in Counter mode for 64 bit input
The idea of a counter stream mode of AES is to generate an random stream of bits by chunk of 128 bits but you are not forced to use all the 128 bits of it.

To encrypt the process is the following, considering $m$ the 64 bits message :


Generate $s = AES(Key, Nounce)$
Notice that $s$ is 128 bits long so $s = s_1 || s_2$ where $s_1$ and $s_2$ are 64 bits long.
$c = m \oplus s_1$ and drop $s_2$ (useless)


To decrypt the process is the same:


Generate $s = AES(Key, Nounce) = s_1 || s_2$ where $s_1$ and $s_2$ are 64 bits long.
$m = c \oplus s_1$




Even though I provided you an answer from a Crypto point of view, I consider this question as off-topic as it feels more like it requires a code answer rather than a Crypto answer (more math oriented).