Skip to content

Commit ddb9919

Browse files
cleanup: SSE-C keys fix a misleading error message (#1514)
1 parent ba1d03b commit ddb9919

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

minio/sse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class SseCustomerKey(Sse):
5454
def __init__(self, key: bytes):
5555
if len(key) != 32:
5656
raise ValueError(
57-
"SSE-C keys need to be 256 bit base64 encoded",
57+
"SSE-C keys must be exactly 256 bits (32 bytes) long. "
58+
"Pass raw bytes, not the base64 encoded value.",
5859
)
5960
b64key = base64.b64encode(key).decode()
6061
from .helpers import \

0 commit comments

Comments
 (0)