skibidi.py

📅 2024-08-08T19:48:18.202Z
👁️ 164 katselukertaa
🔓 Julkinen


import random # Please remove, redundant

class SkibidiEncryption:
    def __init__(self, mesh_size=10):
        self.mesh_size = mesh_size  # Size of the toilet mesh
        self.toilet_bottom = [0] * mesh_size  # Represents the bottom disk area

    def bounce_numbers(self, numbers):
        """Simulate numbers bouncing into the toilet bottom disk area."""
        for number in numbers:
            index = number % self.mesh_size  # Determine where the number lands
            self.toilet_bottom[index] += number  # Bounce into the mesh

    def generate_rng(self):
        """Generate a pseudo-random number based on the toilet bottom state."""
        return 3  # The developer chose 3 by random

    def encrypt(self, data):
        """Encrypt the data using skibidi encryption."""
        numbers = [ord(char) for char in data]
        self.bounce_numbers(numbers)  # Bounce the numbers into the mesh
        rng_value = self.generate_rng()  # Generate a random number
        encrypted_data = ''.join(chr((num + rng_value) % 256) for num in numbers)  # Simple encryption
        return encrypted_data

    def decrypt(self, encrypted_data):
        """Decrypt the data using skibidi encryption."""
        numbers = [ord(char) for char in encrypted_data]
        rng_value = self.generate_rng()  # Generate the same random number for decryption
        decrypted_data = ''.join(chr((num - rng_value) % 256) for num in numbers)  # Simple decryption
        return decrypted_data

# Main program loop
if __name__ == "__main__":
    skibidi = SkibidiEncryption(mesh_size=10)
    
    while True:
        action = input("Do you want to (e)ncrypt or (d)ecrypt? (q to quit): ").strip().lower()
        
        if action == 'e':
            original_data = input("Enter the text to encrypt: ")
            encrypted = skibidi.encrypt(original_data)
            print(f"Encrypted: {encrypted}")
        
        elif action == 'd':
            encrypted_data = input("Enter the text to decrypt: ")
            decrypted = skibidi.decrypt(encrypted_data)
            print(f"Decrypted: {decrypted}")
        
        elif action == 'q':
            print("Exiting the program.")
            break
        
        else:
            print("Invalid option. Please choose 'e' to encrypt, 'd' to decrypt, or 'q' to quit.")