polarssl 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a7a78212d71fa3bd4edcd2c246852d8ea61d212
4
- data.tar.gz: 925252979ac911282e1f8657bcf383c6202c7b4e
3
+ metadata.gz: a3aefd27c4837aa5c16a20f4fdb9ccdf861bca42
4
+ data.tar.gz: d906ff3c64af979f00c88477a6e692d74c7a8f55
5
5
  SHA512:
6
- metadata.gz: 3db3bda0a72377d535c3cc832eb2750684a361f8e56e71ea364acb4ed7cedbe55c8616da795de4574d25f1b10a3c48de06670a6677005d7cdaa282293ce3e054
7
- data.tar.gz: 495bc62b8454626b9dc7d274c2d213233bdbdc825468bdae54b20339b3319cd65e0dc2fc1efa0c31483b368bd6808fc81dbf57bcb8d63778046cc6d2464d048d
6
+ metadata.gz: c7e47febacb18ce4c6e987abb07ff411492e015f5fe5d781147573ca1d89101582cc6cb0c46e60377ee88007b4427a449da95f6b6afee22ab7374655655dc259
7
+ data.tar.gz: 57b9a7d1ed9d4e33483e597bf6fc527d9952e4c65599c742da462aceb2d6120e77b795dcc885c0ccc8ceb3f811baaacf9e102d6099f97af1c06090ec5c546bdc
@@ -4,4 +4,5 @@ before_install:
4
4
 
5
5
  language: ruby
6
6
  rvm:
7
- - "2.0.0"
7
+ - "2.0.0"
8
+ - "1.9.3"
@@ -131,9 +131,9 @@ void Init_cipher(void)
131
131
  * Raised when you do not pass a supported cipher type to PolarSSL::Cipher.new()
132
132
  */
133
133
  e_UnsupportedCipher = rb_define_class_under( cCipher, "UnsupportedCipher", rb_eStandardError );
134
-
134
+
135
135
  /* Document-class: PolarSSL::Cipher::BadInputData
136
- * Raised when the input data for the cipher was incorrect. If you get
136
+ * Raised when the input data for the cipher was incorrect. If you get
137
137
  * this exception, please file a bug report.
138
138
  */
139
139
  e_BadInputData = rb_define_class_under( cCipher, "BadInputData", rb_eStandardError );
@@ -180,7 +180,7 @@ VALUE rb_cipher_initialize( VALUE self, VALUE cipher_type )
180
180
  char *cipher_type_str;
181
181
  const cipher_info_t *cipher_info;
182
182
  int ret;
183
-
183
+
184
184
  Check_Type( cipher_type, T_STRING );
185
185
 
186
186
  cipher_type_str = StringValueCStr( cipher_type );
@@ -193,7 +193,7 @@ VALUE rb_cipher_initialize( VALUE self, VALUE cipher_type )
193
193
  {
194
194
  rb_raise(e_UnsupportedCipher, "%s is not a supported cipher", cipher_type_str );
195
195
  }
196
- else
196
+ else
197
197
  {
198
198
  ret = cipher_init_ctx( rb_cipher->ctx, cipher_info );
199
199
  if ( ret < 0 )
@@ -215,25 +215,25 @@ VALUE rb_cipher_initialize( VALUE self, VALUE cipher_type )
215
215
  * One option to generate a random initialization vector is by using
216
216
  * SecureRandom.random_bytes. Store this initialization vector with the
217
217
  * ciphertext and you'll easily able to decrypt the ciphertext.
218
- *
218
+ *
219
219
  */
220
220
  VALUE rb_cipher_reset( VALUE self, VALUE initialization_vector )
221
221
  {
222
222
  rb_cipher_t *rb_cipher;
223
223
  unsigned char *iv;
224
224
  int ret;
225
-
225
+
226
226
  Check_Type( initialization_vector, T_STRING );
227
-
228
- iv = (unsigned char *) StringValueCStr( initialization_vector );
229
-
227
+
228
+ iv = (unsigned char *) StringValuePtr( initialization_vector );
229
+
230
230
  Data_Get_Struct( self, rb_cipher_t, rb_cipher );
231
-
231
+
232
232
  ret = cipher_reset( rb_cipher->ctx, iv );
233
-
233
+
234
234
  if ( ret < 0 )
235
235
  rb_raise( e_BadInputData, "Either the cipher type, key or initialization vector was not set." );
236
-
236
+
237
237
  return Qtrue;
238
238
  }
239
239
 
@@ -253,7 +253,7 @@ VALUE rb_cipher_setkey( VALUE self, VALUE key, VALUE key_length, VALUE operation
253
253
  {
254
254
  rb_cipher_t *rb_cipher;
255
255
  int ret;
256
-
256
+
257
257
  Check_Type( key, T_STRING );
258
258
  Check_Type( key_length, T_FIXNUM );
259
259
  Check_Type( operation, T_FIXNUM );
@@ -279,7 +279,7 @@ VALUE rb_cipher_update( VALUE self, VALUE rb_input )
279
279
  rb_cipher_t *rb_cipher;
280
280
  char *input;
281
281
  int ret;
282
-
282
+
283
283
  Check_Type( rb_input, T_STRING );
284
284
 
285
285
  Data_Get_Struct( self, rb_cipher_t, rb_cipher );
@@ -1,5 +1,5 @@
1
1
  module PolarSSL
2
2
 
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polarssl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michiel Sikkes