vigenere: Factor encrypt and decrypt functions

The code of those two functions was a dumb copy/paste with a sign
change. Now the code is in a single function with an additional
parameter and the encrypt and decrypt functions are just wrappers.

Signed-off-by: Celelibi <celelibi@gmail.com>