Added implementation of the general substitution cipher