MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

ciphers/xor_cipher.py:24–31  ·  view source on GitHub ↗

simple constructor that receives a key or uses default key = 0

(self, key: int = 0)

Source from the content-addressed store, hash-verified

22
23class XORCipher:
24 def __init__(self, key: int = 0):
25 """
26 simple constructor that receives a key or uses
27 default key = 0
28 """
29
30 # private field
31 self.__key = key
32
33 def encrypt(self, content: str, key: int) -> list[str]:
34 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected