Changeset 17876 for lang/ruby

Show
Ignore:
Timestamp:
08/19/08 01:15:04 (6 years ago)
Author:
winebarrel
Message:
 
Location:
lang/ruby/aesruby/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/aesruby/trunk/aesruby.gemspec

    r17875 r17876  
    22  spec.name              = 'aesruby' 
    33  spec.version           = '0.1.0' 
    4   spec.summary           = 'Ruby bindings for LibLZF.' 
     4  spec.summary           = 'Ruby bindings for C implementation of AES.' 
    55  spec.files             = Dir.glob('ext/*.{c,h}') + %w(ext/extconf.rb README.txt) 
    66  spec.author            = 'abc' 
  • lang/ruby/aesruby/trunk/ext/aesruby.c

    r17866 r17876  
    2121static VALUE AES_EncStr; 
    2222 
     23/* */ 
    2324static VALUE aesruby_encstr_get_srclen(VALUE self) { 
    2425  return rb_ivar_get(self, rb_intern("@srclen")); 
    2526} 
    2627 
     28/* */ 
    2729static VALUE aesruby_encstr_set_srclen(VALUE self, VALUE srclen) { 
    2830  return rb_ivar_set(self, rb_intern("@srclen"), srclen); 
     
    4850} 
    4951 
     52/* */ 
    5053static VALUE aesruby_encrypt0(VALUE self, VALUE key, VALUE src, 
    5154                              AES_RETURN (*encrypt_function)(const unsigned char *, unsigned char *, int, const aes_encrypt_ctx *cx)) { 
     
    9295} 
    9396 
     97/* */ 
    9498static VALUE aesruby_decrypt0(VALUE self, VALUE key, VALUE encrypted, 
    9599                              AES_RETURN (*decrypt_function)(const unsigned char *, unsigned char *, int, const aes_decrypt_ctx *)) { 
     
    129133} 
    130134 
     135/* */ 
    131136static VALUE aesruby_ecb_encrypt(VALUE self, VALUE key, VALUE src) { 
    132137  return aesruby_encrypt0(self, key, src, aes_ecb_encrypt); 
    133138} 
    134139 
     140/* */ 
    135141static VALUE aesruby_ecb_decrypt(VALUE self, VALUE key, VALUE encrypted) { 
    136142  return aesruby_decrypt0(self, key, encrypted, aes_ecb_decrypt); 
     
    147153} 
    148154 
     155/* */ 
    149156static VALUE aesruby_cbc_encrypt(VALUE self, VALUE key, VALUE src) { 
    150157  return aesruby_encrypt0(self, key, src, aes_cbc_encrypt0); 
    151158} 
    152159 
     160/* */ 
    153161static VALUE aesruby_cbc_decrypt(VALUE self, VALUE key, VALUE encrypted) { 
    154162  return aesruby_decrypt0(self, key, encrypted, aes_cbc_decrypt0);