Right after the encryption finished, it asked me for the encryption password. The problem is, when I type it in, the phone just shows the encryption symbol and turns off!!!!!! (is it unrecoverable?)
EDIT: It is not the wrong password, since it doesn't say "Try Again"
You have certainly not lost your device - from comments here and my own experience it seems encryption on Moto G is currently broken with all AOSP based Custom Roms (because they all base on CM sources).
I already filed a bug for this with CyanogenMod devs: CYAN-4532 (can't post URLs yet, sorry)
For recovering you device to a usable state, I would suggest you format /data, /system and /cache with TWRP (for /data you need to find the option where you have to type "yes" to continue, I think it's in the wipe menu somewhere) and install a new rom afterwards (e.g. by adb sideload).
If your Moto G still hangs, just force reboot with long pressing the power key.
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?