strip trailing line break from aes js