Use generateBetween
add test for encrypt/decrypt