ext/ezmlm/hash/hash.c
changeset 17 23c7f5c8ee39
parent 16 e135ccae6783
child 23 eedb2586dea4
equal deleted inserted replaced
16:e135ccae6783 17:23c7f5c8ee39
   146 	char hash[20];
   146 	char hash[20];
   147 	char *input;
   147 	char *input;
   148 
   148 
   149 	Check_Type( email, T_STRING );
   149 	Check_Type( email, T_STRING );
   150 
   150 
   151 	email = rb_str_plus( rb_str_new2("<"), email);
   151 	email = rb_str_plus( rb_str_new2("<"), email );
   152 	input = StringValueCStr( email );
   152 	input = StringValueCStr( email );
   153 
   153 
   154 	makehash( input, strlen(input), hash );
   154 	makehash( input, strlen(input), hash );
   155 
   155 
   156 	return rb_str_new2( hash );
   156 	return rb_str_new( hash, 20 );
   157 }
   157 }
   158 
   158 
   159 
   159 
   160 /*
   160 /*
   161  * call­seq:
   161  * call­seq: