unittest: add encrypt tests