MCPcopy
hub / github.com/smallfawn/QLScriptPublic / b64_rsa

Function b64_rsa

tianyi.py:73–77  ·  view source on GitHub ↗
(plaintext)

Source from the content-addressed store, hash-verified

71 return plaintext.decode()
72
73def b64_rsa(plaintext):
74 public_key = RSA.import_key(public_key_b64)
75 cipher = PKCS1_v1_5.new(public_key)
76 ciphertext = cipher.encrypt(plaintext.encode())
77 return base64.b64encode(ciphertext).decode()
78
79def encode_phone(text):
80 return ''.join(chr(ord(char) + 2) for char in text)

Callers 1

userLoginNormalFunction · 0.85

Calls 1

encryptMethod · 0.80

Tested by

no test coverage detected