encode and decode vigener