Update (At reputation -1): If you downvote, please tell why. UnixCrypt will perfectly do what the OP asked for. He even asked for the modul. So what the heck is wrong with the answer?
Update #2: Okay... I've learned something: Always look at the documentation before you recommend something you don't really know. Thanks for telling me!