pvpgn-twilight 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Changes +4 -1
  2. data/ext/pvpgn.cpp +5 -5
  3. data/pvpgn-twilight.gemspec +1 -1
  4. metadata +1 -1
data/Changes CHANGED
@@ -31,4 +31,7 @@ Version 0.0.9
31
31
  - extconf.rb updates
32
32
 
33
33
  Version 0.1.0
34
- - Changed text formats to UNIX style
34
+ - Changed text formats to UNIX style
35
+
36
+ Version 0.1.1
37
+ - Changed some code to make this Linux/g++ compatable
@@ -141,14 +141,13 @@ static void UTILITY_HexToText(char* pBuffer, t_uint32 dwHex, t_uint32 bUpper = 0
141
141
  }
142
142
  }
143
143
 
144
- static char* PVPGN_CreateHash(char* pHash, t_sint32 nSize)
144
+ static char* PVPGN_CreateHash(char* pHash, t_sint32 nSize, char pHashOut[41])
145
145
  {
146
146
  if(pHash == NULL || nSize < 1)
147
147
  return NULL;
148
148
 
149
149
  t_uint32 dwLength = 0, i;
150
150
  unsigned char* pData = (unsigned char*)pHash;
151
- char pHashOut[41];
152
151
  t_uint32 dwHash[5] = {0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0};
153
152
  t_uint32 dwTemp[80];
154
153
 
@@ -187,15 +186,16 @@ int main(int argc, char *argv[])
187
186
  * converted to a lower case string, the input is also automatically
188
187
  * converted to lower case
189
188
  */
190
- static VALUE __cdecl RUBY_BNHash(int argc, VALUE* argv, VALUE klass)
189
+ static VALUE RUBY_BNHash(int argc, VALUE* argv, VALUE klass)
191
190
  {
191
+ char szHashOut[41];
192
192
  VALUE vPassword;
193
193
  if(argc != 1)
194
- rb_raise(rb_eRuntimeError,"Invalid Amount of Arguments");
194
+ rb_raise(rb_eRuntimeError,"RUBY_BNHash(): Invalid Amount of Arguments");
195
195
 
196
196
  vPassword = argv[0];
197
197
  char* szPass = StringValuePtr(vPassword);
198
- return rb_str_new2(PVPGN_CreateHash(szPass,strlen(szPass)));
198
+ return rb_str_new2(PVPGN_CreateHash(szPass,strlen(szPass),szHashOut));
199
199
  }
200
200
 
201
201
  void Init_pvpgn()
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{pvpgn-twilight}
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.date = %q{2009-12-02}
5
5
  s.authors = ["Lorenzo Boccetti"]
6
6
  s.email = %q{necrolis@gamil.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pvpgn-twilight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo Boccetti