ciphers.gronsfeld_cipher ======================== .. py:module:: ciphers.gronsfeld_cipher Functions --------- .. autoapisummary:: ciphers.gronsfeld_cipher.gronsfeld Module Contents --------------- .. py:function:: gronsfeld(text: str, key: str) -> str Encrypt plaintext with the Gronsfeld cipher >>> gronsfeld('hello', '412') 'LFNPP' >>> gronsfeld('hello', '123') 'IGOMQ' >>> gronsfeld('', '123') '' >>> gronsfeld('yes, ¥€$ - _!@#%?', '0') 'YES, ¥€$ - _!@#%?' >>> gronsfeld('yes, ¥€$ - _!@#%?', '01') 'YFS, ¥€$ - _!@#%?' >>> gronsfeld('yes, ¥€$ - _!@#%?', '012') 'YFU, ¥€$ - _!@#%?' >>> gronsfeld('yes, ¥€$ - _!@#%?', '') Traceback (most recent call last): ... ZeroDivisionError: integer modulo by zero