tdes 1.1.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/tdes/tdes_class.c +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4c7d3feb6e32a1f02619a86a836301be3ec374c75393766abeaf84416cb3899
4
- data.tar.gz: 701b94549d7de007e86b5995e1153abd56b493a4d67159cc7cae1b116d475df3
3
+ metadata.gz: 12c154c458b8603d99fdad00efbd3c9adee6ff67895957323b6e9196266ae2a8
4
+ data.tar.gz: ebbfc616d88fc3da20a22db51e0ca4614d18afc429df457e0869883b538709eb
5
5
  SHA512:
6
- metadata.gz: 186814b8aba4916571262cfec184d93fabfd046ef4ff7abdef27563b4b24c688e5d94b90a9cd85db20c907d85487b38fb1411430b532bd8591d6566e8d8247e9
7
- data.tar.gz: 63184a278bff822ebb4963c9675d4f796bce5a28c83a0858ac2ac5cd59735375220114d3b0586c9c89e14ce27d1b7f01cfca013bb7017c117466ddecbb89ab91
6
+ metadata.gz: f5fc4af1576b06753d7f54cceab273106a1401d0f089a3bb0a298904d75c2b65e00578befe656bc9348b05e562e2555b39d63a1205d9419733c6ee4bfec52964
7
+ data.tar.gz: 84d9a1186d82fb14d259fcd133154202919ce0f6e2738fffb93418b50518d86ca5682266a1ef3578ff3580d284ddffd495281cf9627dd5e069656909b0dcebf4
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Bastos