Home > database >  Pb for string SHA1 value DLL, download pbfunc. DLL, a string containing the Chinese word, remove the
Pb for string SHA1 value DLL, download pbfunc. DLL, a string containing the Chinese word, remove the

Time:09-16

As title, please get string SHA1 value DLL, I downloaded the PB in the encryption to decrypt pbfunc. DLL, a string containing the Chinese word, take out the values are not correct,
Thank you,

CodePudding user response:

In the API statement with ANSI

Such as
Ulong GetSystemDirectoryA (ref string wdir, ulong buf) LIBRARY "kernel32. DLL
"
Instead of

The Function uint GetSystemDirectory (ref string lpBuffer, uint uSize) Library 'kernel32. DLL' Alias for 'GetSystemDirectoryA; ANSI '

CodePudding user response:

Pb version of the original poster is a few? Is behind the pb pb0 and above statement added alias for "XXX; ANSI ", or you will be the demo with pb upgrade directly go up, the ide will automatically help you add
For example,
The function long MD5 (string STR, ref string md5content) library "pbfunc. DLL" alias for "MD5; Ansi
"The function long SHA1 (string STR, ref string content) library "pbfunc. DLL" alias for "SHA1. Ansi
"The function long RIPEMD160 digest (string STR, ref string content) library "pbfunc. DLL" alias for "RIPEMD160 digest; Ansi
"The function long SHA256 (string STR, ref string content) library "pbfunc. DLL" alias for "SHA256; Ansi
"The function long Tiger (string STR, ref string content) library "pbfunc. DLL" alias for "Tiger; Ansi
"The function long SHA512 (string STR, ref string content) library "pbfunc. DLL" alias for "SHA512; Ansi
"The function long Whirlpool (string STR, ref string content) library "pbfunc. DLL" alias for "Whirlpool; Ansi
"The function long CRC32 (string STR, ref string content) library "pbfunc. DLL" alias for "CRC32; Ansi
"

CodePudding user response:

Dear teachers, my statement is as follows: the function long SHA1 (string STR, ref string content) library "pbfunc. DLL" alias for "SHA1. Ansi
"For example, the string " test ", call pbfunc. DLL get sha1 value is " B9B0EC5E6872C2237692F22DD052409450A81B60
"But other people's value is "0 b5d7ed54bee16756a7579c6718ab01e3d1b75eb", thank you

CodePudding user response:

You use SQLServer2005 try result of the statement returns with this DLL, unlike others, is not necessarily the DLL, there is no doubt about each other?
SqlServer2005:
The select sys. Fn_varbintoHexStr (hashbytes (' SHA1 ', 'test'))

CodePudding user response:

I tried it on, you'll have to put the string into a utf-8 is that you can return to 0 b5d7ed54bee16756a7579c6718ab01e3d1b75eb
The code is as follows:
The external call statement
The function long SHA1 (blob STR, ref string content) library "pbfunc. DLL" alias for "SHA1. Ansi
"The function long GbkToUtf8 (string SRC, ref blob utf8, ref long l) library "pbfunc. DLL" alias for "GbkToUtf8; Ansi
"The code
 
String ls_content
String data
Blob utf8, utf8R
GBK string
Data=https://bbs.csdn.net/topics/sle_1.text
Utf8=Blob (space ((len (data) + 1) * 2))//GBK into utf8, to allocate the space used to store the utf-8 first
Long ll_tf8Len//utf8 content length
GbkToUtf8 (data, utf8, ll_tf8Len)
Utf8R=BlobMid (utf8, 1, ll_tf8Len)//real utf8 content

IF SHA1 (utf8R, ls_content)=1 Then//computing SHA1
Sle_3. Text=ls_content
The Else
Sle_3. Text="error"
End the IF


If you're not GbkToUtf8 this function, on the other side of the DLL you direct messages to me

CodePudding user response:

Run upstairs the DLL, the second time freezes, seek a solution

CodePudding user response:

Me too, do you think of some way to solve!

CodePudding user response:

Can take me upstairs? Qq: 1506634283 thank you

CodePudding user response:

http://download.csdn.net/detail/my_aa/8458299
Here to download, solve the problem of utf8 error
  • Related