Online Nandroid Backup and later restore of an encrypted Android L 5.1 device
I looked at the onandroid script and it seems that it does a block-level copy of the data with dd only for partitions that are not mounted during the normal system operation (such as recovery partition) and copies the files on the filesystem level from the mounted ones - meaning it copies the decrypted content of the data partition and others and creates a backup images out of it. Further testing would be needed to determine what happens after a recovery is made from a system image (expecting encrypted data) and non-encrypted data image.

It seems that onandroid is "best effort" software (I didn't see any mount -o remount,ro / before copying the contents of the partition - it would probably also affect the running system possibly crashing it) and is therefore best not to use it with encrypted devices. The proper way to handle them still remains encryption-supporting recovery such as TWRP (or dumping the partitions via adb pull while in ADB-supporting recovery). I would be happy to be proven wrong by someone who knows the onandroid script in greater depth.