Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions _test_unstructured_client/unit/test_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ def test_encrypt_around_rsa_size_limit(rsa_key_pair, plaintext, secret_type):
"""
_, public_key_pem = rsa_key_pair

print(f"Testing plaintext of length {len(plaintext)} with expected type {secret_type}")

# Load the public key
public_key = serialization.load_pem_public_key(
public_key_pem.encode('utf-8'),
Expand Down
1 change: 0 additions & 1 deletion src/unstructured_client/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ def encrypt_secret(
# Use the length of the public key to determine the encryption type
key_size_bytes = public_key.key_size // 8
max_rsa_length = key_size_bytes - 66 # OAEP SHA256 overhead
print(max_rsa_length)

if not encryption_type:
encryption_type = "rsa" if len(plaintext) <= max_rsa_length else "rsa_aes"
Expand Down