77
88class string (object ):
99
10- encrypted_text = '\0 '
10+ __ciphertext__ = '\0 '
1111 __KEY__ = Random .new ().read (32 )
1212 __IV__ = Random .new ().read (16 )
1313
@@ -17,8 +17,8 @@ def wrapper(*arguments):
1717 if not re .match ('<__main__.*object at.*>' ,str (arguments [0 ])):
1818 raise SyntaxError ('Method must be an instance method of a class!' )
1919 for string in arguments [1 :]:
20- cls .encrypted_text = AES .new ( cls .__KEY__ , AES .MODE_CFB , cls .__IV__ ).encrypt (string )
21- return func (arguments [0 ].__class__ ,cls .encrypted_text )
20+ cls .__ciphertext__ = AES .new ( cls .__KEY__ , AES .MODE_CFB , cls .__IV__ ).encrypt (string )
21+ return func (arguments [0 ].__class__ ,cls .__ciphertext__ )
2222 return wrapper
2323
2424 @classmethod
@@ -27,6 +27,6 @@ def wrapper(*arguments):
2727 if not re .match ('<__main__.*object at.*>' ,str (arguments [0 ])):
2828 raise SyntaxError ('Method must be an instance method of a class!' )
2929 for string in arguments [1 :]:
30- cls .encrypted_text = AES .new ( cls .__KEY__ , AES .MODE_CFB , cls .__IV__ ).decrypt (string )
31- return func (arguments [0 ].__class__ ,cls .encrypted_text )
30+ cls .__ciphertext__ = AES .new ( cls .__KEY__ , AES .MODE_CFB , cls .__IV__ ).decrypt (string )
31+ return func (arguments [0 ].__class__ ,cls .__ciphertext__ )
3232 return wrapper
0 commit comments