@@ -0,0 +1,1380 @@
+import base64%0Aimport sys%0A%0Aclass Plugin:%0A    def get_hash_func(self, algorithm, action):%0A        if algorithm == %22base64%22 or algorithm == %22b64%22:%0A            if action == %22encode%22:%0A                return base64.b64encode%0A            elif action == %22decode%22:%0A                return base64.b64decode%0A        elif algorithm == %22base32%22 or algorithm == %22b32%22:%0A            if action == %22encode%22:%0A                return base64.b32encode%0A            elif action == %22decode%22:%0A                return base64.b32decode%0A        elif algorithm == %22base16%22 or algorithm == %22b16%22:%0A            if action == %22encode%22:%0A                return base64.b16encode%0A            elif action == %22decode%22:%0A                return base64.b16decode%0A%0A    def on_command(self, bot, msg):%0A        if len(sys.argv) %3E= 3:%0A            algorithm = sys.argv%5B1%5D%0A            action = sys.argv%5B2%5D%0A            contents = %22 %22.join(sys.argv%5B3:%5D)%0A            if not contents:%0A                contents = sys.stdin.read().strip()%0A%0A            func = self.get_hash_func(algorithm, action)%0A            if func:%0A                result = str(func(bytes(contents, %22utf-8%22)), %22utf-8%22)%0A                print(result)%0A            else:%0A                print(%22No hash algorithm:%22, algorithm)%0A        else:%0A            print(self.on_help(bot))%0A%0A    def on_help(self, bot):%0A        return %22Usage: crypto %3Calgorithm%3E encode%7Cdecode %3Ccontents%3E%22%0A

Add crypto plugin