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.
- data/Changes +4 -1
- data/ext/pvpgn.cpp +5 -5
- data/pvpgn-twilight.gemspec +1 -1
- metadata +1 -1
data/Changes
CHANGED
data/ext/pvpgn.cpp
CHANGED
@@ -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
|
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()
|
data/pvpgn-twilight.gemspec
CHANGED