codecipher.vernam.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 VernamEncode with attribute(s) and method(s). Creates encode class with backend API.
- class codecipher.vernam.encode.VernamEncode(_encode_data: str | None)[source]¶
Bases:
object
Defines class VernamEncode 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.encode - Encode data to Vernam format.
- _encode_data: str | None¶
- encode(data: str | None, key: str | None) None [source]¶
Encoding data to Vernam format.
- Parameters:
data (<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