Is there any 1024 bits hash function can i use with harbour programs?

490 views
Skip to first unread message

sandin...@gmail.com

unread,
Jun 8, 2024, 11:51:28 PMJun 8
to Harbour Users
Hi every body Is there any 1024 bits hash function can i use with harbour programs?

cod...@outlook.com

unread,
Jun 9, 2024, 5:14:30 AMJun 9
to Harbour Users
Hi

On this link


You can find this text

  • hb_SHA1(<cBuffer> [, <lBin>] cDigest
  • hb_SHA224(<cBuffer> [, <lBin>] cDigest
  • hb_SHA256(<cBuffer> [, <lBin>] cDigest
  • hb_SHA384(<cBuffer> [, <lBin>] cDigest
  • hb_SHA512(<cBuffer> [, <lBin>] cDigest
    Above functions are used to calculate hash value (digest) of given <cBuffer> according to SHA-1SHA-2SHA-3 Secure Hash Algorithms.
    <lBin> flag controls whether to return binary data or hexadecimal string, default .F., that is, return hexadecimal string.
 Regards,
Simo.

veparakos esperantoshio

unread,
Jun 10, 2024, 1:11:04 AMJun 10
to Harbour Users
Hi thank you my dear brother for your precious answer ..but what i am looking for is 1024 bits hash function all  those functions you give me is generated hash below 1024 bits ..so is there any other hash function can generate 1024 bits hash? 

juanpere...@gmail.com

unread,
Jun 10, 2024, 2:16:17 AMJun 10
to Harbour Users

Hello

Generating a 1024-bit hash for encryption is not considered necessary, for personal use 512 is more than enough, which is why it has not been implemented.

For more secure communication, it is not recommended either, for example Microsoft is going to discontinue its use, it recommends the use of a 2048-bit hash.

For more information, please visit the following links.

veparakos esperantoshio

unread,
Jun 11, 2024, 3:53:54 PMJun 11
to Harbour Users
Thank you very much my dear brother for your precious information ,from what you give me regarding SHA-3 as it is mentioned in wiki there is SHAKE 256 how i can use this hash function(SHAKE256) in Harbour where i can get its code and how i can include it in my Harbour program?    

veparakos esperantoshio

unread,
Jun 12, 2024, 3:50:05 PMJun 12
to Harbour Users
Hi my all dear brothers...i am still waiting for your answer about my question ... how i can use hash function(SHAKE256) in Harbour ,where i can get its code and how i can include it in my Harbour program?    

juanpere...@gmail.com

unread,
Jun 12, 2024, 8:26:28 PMJun 12
to Harbour Users
Hello

An example of how to use SHAKE256 in harbour and it is in the hbcrypto.lib library
C:\MiniGUI\Harbour\lib
Source code
C:\MiniGUI\SOURCE\HbCrypto

procedure main()

    ? "sha3 256"
    ? hb_sha3256("i can include it in my Harbour program")
    ? hb_sha3256("whereicangetitscode")
    ? "--------------------------"
    ? "sha3 512"
    ? hb_sha3512("i can include it in my Harbour program")
    ? hb_sha3512("whereicangetitscode")
    ? "--------------------------"
    ? "SHAKE256"
    ? hb_shake256("i can include it in my Harbour program")
    ? hb_shake256("whereicangetitscode")

return
sha3.jpglibreria.jpg

veparakos esperantoshio

unread,
Jun 14, 2024, 1:40:53 AMJun 14
to Harbour Users
Thank you very much for your precious answer ...can you give me direct link to download the  hbcrypto.lib in one file only  so i can include it in my program.

juanpere...@gmail.com

unread,
Jun 14, 2024, 2:15:01 PMJun 14
to Harbour Users

veparakos esperantoshio

unread,
Jun 14, 2024, 4:22:56 PMJun 14
to Harbour Users
Thank you my brother for your precious answer but google drive ask me to wait for permission to access the file...can you upload the same file other than google drive. 

juanpere...@gmail.com

unread,
Jun 14, 2024, 5:00:22 PMJun 14
to Harbour Users

veparakos esperantoshio

unread,
Jun 15, 2024, 5:15:20 PMJun 15
to Harbour Users
Thank you very much for your precious answer my dear brother ...but how i can include the file in my program ?!  

juanpere...@gmail.com

unread,
Jun 18, 2024, 1:22:57 AMJun 18
to Harbour Users
Hi 

It depends on how you compile in harbour on the command line or with some application. 
With hbmk2 with the -l option, non-standard libraries are included.
hbmk2.jpg
You can also use QPM https://teamqpm.github.io/
qpm.jpg

veparakos esperantoshio

unread,
Jun 19, 2024, 1:49:35 PM (14 days ago) Jun 19
to Harbour Users
Thank you very much my brother for your precious answer ...i tried what you said but i am getting this error:
 Error F0029  Can't open #include file 'C:\PWCT19\ssbuild\minigui\Harbour\lib\hbcrypto.lib'

veparakos esperantoshio

unread,
Jun 20, 2024, 10:46:20 AM (13 days ago) Jun 20
to Harbour Users
i am still waiting for your precious answers my dear brothers

juanpere...@gmail.com

unread,
Jun 20, 2024, 5:29:52 PM (13 days ago) Jun 20
to Harbour Users
What minigui do you use, what c compiler?
I use https://www.hmgextended.com/ ,  Borland C++ compiler Version 5.8 and it works without error.
Reply all
Reply to author
Forward
0 new messages