Skip to content

Commit d77c08d

Browse files
more accurate exception
1 parent 7dc8b56 commit d77c08d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CryptoLib/AesSiv.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public class AesSiv {
160160
let status = CCCrypt(CCOperation(kCCEncrypt), CCAlgorithm(kCCAlgorithmAES), CCOptions(kCCOptionECBMode), key, key.count, nil, plaintext, plaintext.count, &ciphertext, kCCBlockSizeAES128, &ciphertextLen)
161161

162162
guard status == kCCSuccess else {
163-
throw AesSivError.invalidParameter("AES failed")
163+
throw AesSivError.encryptionFailedWithStatus(status)
164164
}
165165

166166
return ciphertext

0 commit comments

Comments
 (0)