"""Automated breaking of the Atbash Cipher."""

from lantern.modules import simplesubstitution

from typing import Iterable

# TODO: Consider using an affine cipher for transformation in future

KEY = 'ZYXWVUTSRQPONMLKJIHGFEDCBA'


def decrypt(ciphertext: str) -> Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


def encrypt(plaintext: str) -> Iterable:
    """Encrypt ``plaintext`` using the Atbash cipher.

    Examples:
        >>> ''.join(encrypt("HELLO"))
        SVOOL

    Args:
        plaintext (str): English string to encrypt

    Returns:
        Encrypted text
    """
    return simplesubstitution.encrypt(KEY, plaintext)

9d2a61454a420960efce2556ca75635aa8c83560
<mask token>


def decrypt(ciphertext: str) ->Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


<mask token>

<mask token>


def decrypt(ciphertext: str) ->Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


def encrypt(plaintext: str) ->Iterable:
    """Encrypt ``plaintext`` using the Atbash cipher.

    Examples:
        >>> ''.join(encrypt("HELLO"))
        SVOOL

    Args:
        plaintext (str): English string to encrypt

    Returns:
        Encrypted text
    """
    return simplesubstitution.encrypt(KEY, plaintext)

<mask token>
KEY = 'ZYXWVUTSRQPONMLKJIHGFEDCBA'


def decrypt(ciphertext: str) ->Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


def encrypt(plaintext: str) ->Iterable:
    """Encrypt ``plaintext`` using the Atbash cipher.

    Examples:
        >>> ''.join(encrypt("HELLO"))
        SVOOL

    Args:
        plaintext (str): English string to encrypt

    Returns:
        Encrypted text
    """
    return simplesubstitution.encrypt(KEY, plaintext)

<mask token>
from lantern.modules import simplesubstitution
from typing import Iterable
KEY = 'ZYXWVUTSRQPONMLKJIHGFEDCBA'


def decrypt(ciphertext: str) ->Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


def encrypt(plaintext: str) ->Iterable:
    """Encrypt ``plaintext`` using the Atbash cipher.

    Examples:
        >>> ''.join(encrypt("HELLO"))
        SVOOL

    Args:
        plaintext (str): English string to encrypt

    Returns:
        Encrypted text
    """
    return simplesubstitution.encrypt(KEY, plaintext)

"""Automated breaking of the Atbash Cipher."""

from lantern.modules import simplesubstitution

from typing import Iterable

# TODO: Consider using an affine cipher for transformation in future

KEY = 'ZYXWVUTSRQPONMLKJIHGFEDCBA'


def decrypt(ciphertext: str) -> Iterable:
    """Decrypt Atbash enciphered ``ciphertext``.

    Examples:
        >>> ''.join(decrypt("SVOOL"))
        HELLO

    Args:
        ciphertext (str): English string to decrypt

    Returns:
        Decrypted text
    """
    return simplesubstitution.decrypt(KEY, ciphertext)


def encrypt(plaintext: str) -> Iterable:
    """Encrypt ``plaintext`` using the Atbash cipher.

    Examples:
        >>> ''.join(encrypt("HELLO"))
        SVOOL

    Args:
        plaintext (str): English string to encrypt

    Returns:
        Encrypted text
    """
    return simplesubstitution.encrypt(KEY, plaintext)
