(public_key, data)
| 71 | hashes.SHA256()) |
| 72 | |
| 73 | def encrypt_basic256(public_key, data): |
| 74 | ciphertext = public_key.encrypt( |
| 75 | data, |
| 76 | padding.OAEP( |
| 77 | mgf=padding.MGF1(algorithm=hashes.SHA256()), |
| 78 | algorithm=hashes.SHA256(), |
| 79 | label=None) |
| 80 | ) |
| 81 | return ciphertext |
| 82 | |
| 83 | |
| 84 | def encrypt_rsa_oaep(public_key, data): |