Search found 3360 matches

by srvaldez
Jun 18, 2024 21:00
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

ok, I will make my ignorance shine, isn't that what you can do with AES_ECB ? #define AES128 1 #define AES192 0 #define AES256 0 #include "aes.bi" dim as AES_ctx ctx dim as zstring ptr buf=callocate(256) dim as long length, i *buf="3.141592653589793238462643383279502884197169399375105...
by srvaldez
Jun 18, 2024 13:48
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

I had a look at the assembler code and also at the cpp code, I don't understand either one the cpp macros with the do{ .... }while(0) are baffling to me, I don't know what they do. just in case anyone who doesn't know how to use the AES CTR in tinyAES, just take example 2 or 3 above and replace AES_...
by srvaldez
Jun 18, 2024 11:56
Forum: Linux
Topic: Lib Path
Replies: 1
Views: 155

Re: Lib Path

Hi Dinosaur :)
it didn't occur to me until just now, if you haven't solved it already then try executing the ldconfig command, executing ldconfig without any options quite often fixes such problems
by srvaldez
Jun 15, 2024 20:00
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

... I wonder how much more minimal/performant it'd get with the AES-NI assembly instructions. I don't know how to use them, but somebody must. at least 2 people from the masm forum gave it a go, https://masm32.com/board/index.php?msg=80831 which is based on this C code https://stackoverflow.com/que...
by srvaldez
Jun 15, 2024 16:31
Forum: Beginners
Topic: Unicode Test (Chinese) winfbx
Replies: 10
Views: 444

Re: Unicode Test (Chinese) winfbx

@Löwenherz
would you open a thread about this in the WinFBE project thread ?
it seems to me that a BOM is needed for Chinese characters to be displayed but I found no such option in WinFBE
by srvaldez
Jun 15, 2024 14:13
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

thank you deltarho[1859] for your comments and testing 😁
by srvaldez
Jun 15, 2024 12:53
Forum: Beginners
Topic: Unicode Test (Chinese) winfbx
Replies: 10
Views: 444

Re: Unicode Test (Chinese) winfbx

hello Löwenherz :) I think that this thread should have been posted in the WinFBE project but I can confirm that when you start a new project in WinFBE that the Chinese characters are displayed as ??? I looked to see if there was a BOM option but I could not find one, however if I open the basic fil...
by srvaldez
Jun 14, 2024 20:21
Forum: Beginners
Topic: Unicode Test (Chinese) winfbx
Replies: 10
Views: 444

Re: Unicode Test (Chinese) winfbx

I use the geany IDE and have no problems, in geany I select: Document->Write Unicode BOM

Code: Select all

' winfbx editor
'
#define UNICODE
#INCLUDE ONCE "Afx/CWindow.inc"
USING Afx
DIM cws AS CWSTR = "你好世界" '' chinese txt
AfxMsg MID(**cws, 2)
by srvaldez
Jun 14, 2024 18:59
Forum: Community Discussion
Topic: Viewing FreeBasic.pdf
Replies: 5
Views: 321

Re: Viewing FreeBasic.pdf

Peter_G
if your OS is Linux then if you haven't already installed a chm viewer then I suggest that you install xchm or similar, then you can use the UpToDate FB manual
by srvaldez
Jun 14, 2024 10:56
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

here's the simple example which base64 encodes the encrypted message Declare Function CryptBinaryToString Lib "Crypt32"Alias "CryptBinaryToStringA" _ (byval pbBinary As zstring Ptr, byval cbBinary As uLong, byval dwFlags As uLong, _ byval pszString As zstring Ptr,byval pcchString...
by srvaldez
Jun 14, 2024 10:43
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

Hi dodicat :) did you put the following code before including aes.bi ? 'set one of these to 1, these 3 lines must be present before including aes.bi #define AES128 0 #define AES192 0 #define AES256 1 #include "aes.bi" failure to do so may give the errors you mentioned, if it's something el...
by srvaldez
Jun 13, 2024 21:51
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

Re: tinyAES

another very simple test #define CBC 1 #define ECB 1 #define CTR 1 'set one of these to 1 #define AES128 0 #define AES192 0 #define AES256 1 #include "aes.bi" dim as AES_ctx ctx dim as zstring ptr buf=callocate(256) dim as long length, i dim as string key = "abcdefghijklmnop" dim...
by srvaldez
Jun 13, 2024 19:56
Forum: Sources, Examples, Tips and Tricks
Topic: tinyAES
Replies: 16
Views: 870

tinyAES

an attempt at translating tiny-AES-c to FB https://github.com/kokke/tiny-AES-c AES.bi #pragma once #include once "crt/string.bi" extern "C" #define _AES_H_ #ifndef CBC #define CBC 1 #endif #ifndef ECB #define ECB 1 #endif #ifndef CTR #define CTR 1 #endif #define AES_BLOCKLEN 16 '...
by srvaldez
Jun 10, 2024 19:33
Forum: Windows
Topic: Do we have a module level constructor ?
Replies: 7
Views: 259

Re: Do we have a module level constructor ?

in my opinion optimization when calling Windows library functions or other libraries will have no effect, it's only useful for FB code.
by srvaldez
Jun 10, 2024 18:38
Forum: Windows
Topic: Do we have a module level constructor ?
Replies: 7
Views: 259

Re: Do we have a module level constructor ?

yes, I think that you are right, but O3 is not always faster than O2, quite often O2 is faster but there are other options that sometimes help, like -Wc -Ofast or -Wc -Os (s stands for small) -arch native sometimes makes a dramatic boost in performance, here's what I normally use fbc64 -asm intel -t...