How to encrypt with AES?

337 views
Skip to first unread message

rossi.ma...@gmail.com

unread,
Mar 17, 2025, 5:23:27 AMMar 17
to Harbour Users
Hello everyone,
reading old conversations I learned that in Harbour it is possible to use AES encryption but I couldn't figure out how to do it.
Could someone please show me, step by step, what to do?
An example of use would also be helpful.

Regards.

Takács Gábor

unread,
Mar 17, 2025, 6:39:49 AMMar 17
to harbou...@googlegroups.com

I found complete working method to aes128, 192, 256 without any extra libs (crypto, Ssl, etc.), i send the link soon..


--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/693a0606-a32d-47b2-8261-be404b5a614fn%40googlegroups.com.

Martin Fears

unread,
Apr 10, 2025, 7:44:46 PMApr 10
to Harbour Users
Can you post the working method here please?

Gábor Takács

unread,
Apr 11, 2025, 6:04:49 AMApr 11
to harbou...@googlegroups.com

Takács Gábor

unread,
Apr 11, 2025, 9:28:41 AMApr 11
to harbou...@googlegroups.com

prg...@gmail.com

unread,
Apr 11, 2025, 4:23:28 PMApr 11
to Harbour Users
I believe Victor's branch of harbour has some enhanced encryption functions that are not in the main branch of harbour.

Gábor Takács

unread,
Apr 12, 2025, 1:23:00 AMApr 12
to harbou...@googlegroups.com

Vicor’s branch has sha3512 func.



--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

jijucha...@gmail.com

unread,
Apr 12, 2025, 3:19:57 AMApr 12
to Harbour Users
Hello Everyone,
Please refer to this discussion ---> https://groups.google.com/g/harbour-users/c/nVwkOKE8hAM/m/_Alv-RgNAgAJ  "What it translates to in Harbour - AES 256 (AES/ECB/PKCS7Padding)" 

I had inserted a sample code that I have been using for a few years and then I was supposed to add an example PRG and, Diego provided a better written example: EVP_CIPHER.PRG, then I didn't provide my example PRG as Diego's sample is better written and concise. 

Please feel free to ask anything related to AES Encryption and Decryption.

I have tested these with OpenSSL 3.4.0 and works perfectly. 

Best regards,

Gábor Takács

unread,
Apr 12, 2025, 4:43:29 AMApr 12
to Harbour Users
Starting from the beginning...


I found complete working method to aes128, 192, 256 without any extra libs (crypto, Ssl, etc.), i send the link soon..
 under Sami Lahams post find aes.zip <- this is what you want...
    http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=17146&sid=50201eea1ec58daec5f30b825338d77e

 under Szabó Attila's post you find link to test.
    https://8gwifi.org/CipherFunctions.jsp
 
This .zip contains full working harbour code without any internal libs (ssl, etc.)
But. This release not contain any PKCS5 etc. paddings.
I use only standard AES128 (the code contain AES192 and AES256) +  minimal coding work to added padding PKCS5/PKCS7.

Please download it and test. Let me know how you get on.

Gábor
Reply all
Reply to author
Forward
0 new messages