tdes 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/tdes/tdes_class.c +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12c154c458b8603d99fdad00efbd3c9adee6ff67895957323b6e9196266ae2a8
|
4
|
+
data.tar.gz: ebbfc616d88fc3da20a22db51e0ca4614d18afc429df457e0869883b538709eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5fc4af1576b06753d7f54cceab273106a1401d0f089a3bb0a298904d75c2b65e00578befe656bc9348b05e562e2555b39d63a1205d9419733c6ee4bfec52964
|
7
|
+
data.tar.gz: 84d9a1186d82fb14d259fcd133154202919ce0f6e2738fffb93418b50518d86ca5682266a1ef3578ff3580d284ddffd495281cf9627dd5e069656909b0dcebf4
|
data/ext/tdes/tdes_class.c
CHANGED
@@ -24,16 +24,16 @@ VALUE tdes_new(VALUE class, VALUE key) {
|
|
24
24
|
case 24:
|
25
25
|
err = DES_set_key_checked((void*) raw_key + 16, &key_data->ks3);
|
26
26
|
if (err) {
|
27
|
-
rb_raise(rb_eArgError, "Invalid DES key");
|
27
|
+
rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
|
28
28
|
}
|
29
29
|
case 16:
|
30
30
|
err = DES_set_key_checked((void*) raw_key + 8, &key_data->ks2);
|
31
31
|
if (err) {
|
32
|
-
rb_raise(rb_eArgError, "Invalid DES key");
|
32
|
+
rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
|
33
33
|
}
|
34
34
|
err = DES_set_key_checked((void*) raw_key + 0, &key_data->ks1);
|
35
35
|
if (err) {
|
36
|
-
rb_raise(rb_eArgError, "Invalid DES key");
|
36
|
+
rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
|
37
37
|
}
|
38
38
|
break;
|
39
39
|
|