tdes 1.2.1 → 2.0.0

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 -13
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12c154c458b8603d99fdad00efbd3c9adee6ff67895957323b6e9196266ae2a8
4
- data.tar.gz: ebbfc616d88fc3da20a22db51e0ca4614d18afc429df457e0869883b538709eb
3
+ metadata.gz: 5cddfd30668bdad791c32854d5f95a48f4aec801af4a12e97bcfe8fae8ea1cd8
4
+ data.tar.gz: 54cf93e8fd85596f4e03dc7be34ed12799522d0f3ceb1af9e25b930b6f873658
5
5
  SHA512:
6
- metadata.gz: f5fc4af1576b06753d7f54cceab273106a1401d0f089a3bb0a298904d75c2b65e00578befe656bc9348b05e562e2555b39d63a1205d9419733c6ee4bfec52964
7
- data.tar.gz: 84d9a1186d82fb14d259fcd133154202919ce0f6e2738fffb93418b50518d86ca5682266a1ef3578ff3580d284ddffd495281cf9627dd5e069656909b0dcebf4
6
+ metadata.gz: 53819b240e65d3a46e1c0fe3e73b5f81b5ddcd4533a9f2b94125e4ec76a2511b98193c980a2dafa595dfe04368ffd3ad827ab920e92955d9e6b7725410c7f299
7
+ data.tar.gz: ee16aff6d21f5060e0607574c947d158deb6872a7baf6b449a34383ee9107b72fa333af0e213fb25d2c58e1e4b2d776b93092685b769683e391857d20c0483a7
@@ -19,22 +19,12 @@ VALUE tdes_new(VALUE class, VALUE key) {
19
19
  rb_raise(rb_eRuntimeError, "Failed to setup internal data");
20
20
  }
21
21
 
22
- int err;
23
22
  switch (key_length) {
24
23
  case 24:
25
- err = DES_set_key_checked((void*) raw_key + 16, &key_data->ks3);
26
- if (err) {
27
- rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
28
- }
24
+ DES_set_key_unchecked((void*) raw_key + 16, &key_data->ks3);
29
25
  case 16:
30
- err = DES_set_key_checked((void*) raw_key + 8, &key_data->ks2);
31
- if (err) {
32
- rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
33
- }
34
- err = DES_set_key_checked((void*) raw_key + 0, &key_data->ks1);
35
- if (err) {
36
- rb_raise(rb_eArgError, "Invalid DES key: %s", err == -1 ? "parity" : "weak");
37
- }
26
+ DES_set_key_unchecked((void*) raw_key + 8, &key_data->ks2);
27
+ DES_set_key_unchecked((void*) raw_key + 0, &key_data->ks1);
38
28
  break;
39
29
 
40
30
  default:
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.2.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Bastos