题目描述
Weird Wally's Wireless Widgets, Inc. manufactures an eclectic assortmentof small, wireless, network capable devices, ranging from dog collars,to pencils, to fishing bobbers. All these devices have very smallmemories. Encryption algorithms like Rijndael, the candidate for theAdvanced Encryption Standard (AES) are demonstrably secure but theydon't fit in such a tiny memory. In order to provide some security fortransmissions to and from the devices, WWWW uses the followingalgorithm, which you are to implement. Encrypting a message requiresthree integer keys, k1, k2, and k3. The letters [a-i] form one group,[j-r] a second group, and everything else ([s-z] and underscore) thethird group. Within each group the letters are rotated left by kipositions in the message. Each group is rotated independently of theother two. Decrypting the message means doing a right rotation by kipositions within each grou