codecipher.vigenere.encode module

Module

encode.py

Copyright

Copyright (C) 2021 - 2024 Vladimir Roncevic <elektron.ronca@gmail.com> codecipher is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. codecipher is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Info

Defines class VigenereEncode with attribute(s) and method(s). Creates encode class with backend API.

class codecipher.vigenere.encode.VigenereEncode(_encode_data: str | None)[source]

Bases: object

Defines class VigenereEncode with attribute(s) and method(s). Creates encode class with backend API.

It defines:

attributes:
_encode_data - Data encode container.
methods:
encode_data - Property methods for encode data.
_split_data - Splitting data for encoding.
encode - Encode data to Vigenere format.
_encode_data: str | None
_split_data(data_to_encode: str | None, key: str | None) List[str][source]

Splitting data for encoding.

Parameters:
  • data_to_encode (<str> | <NoneType>) – Data which should be encoded | None

  • key (<str> | <NoneType>) – Key for encoding | None

Returns:

List with data for encoding

Return type:

<List[str]>

Exceptions:

None

encode(data_to_encode: str | None, key: str | None) None[source]

Encoding data to Vigenere format.

Parameters:
  • data_to_encode (<str> | <NoneType>) – Data which should be encoded | None

  • key (<str> | <NoneType>) – Key for encoding | None

Returns:

None

Exceptions:

None

property encode_data: str | None

Property method for getting encode data.

Returns:

Encoded data | None

Return type:

<str> | <NoneType>

Exceptions:

None