Search found 3443 matches

by idle
Fri Oct 22, 2021 12:31 am
Forum: Feature Requests and Wishlists
Topic: CreateNetworkServerSSL()
Replies: 10
Views: 2296

Re: CreateNetworkServerSSL()

Simplest way to create a secure network server in PB is to use Curve25519 elliptic curve module to generate an encryption key https://www.purebasic.fr/english/viewtopic.php?f=12&t=55892 https://en.wikipedia.org/wiki/Curve25519 Since 2013, Curve25519 has become the de facto alternative to P-256, ...
by idle
Wed Oct 13, 2021 10:17 pm
Forum: Tricks 'n' Tips
Topic: Convert Hex string to binary
Replies: 2
Views: 494

Re: Convert Hex string to binary

Thanks

Code: Select all

s.s= Hex(4276996862) 
Debug CreateHexFile(@s)
Debug s 
by idle
Mon Oct 11, 2021 11:53 pm
Forum: General Discussion
Topic: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones
Replies: 6
Views: 893

Re: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones

yes the last paragraph seemed to explain the situation. G.723.1 codec seems to ring a bell it was a lossy 8 bit codec but it worked fine until they cottoned on and switched the codec for one that just plain filtered out the dtmf. I still can't get it going on the vm, might need to try it with histor...
by idle
Sun Oct 10, 2021 10:23 pm
Forum: General Discussion
Topic: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones
Replies: 6
Views: 893

Re: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones

@Idle, I will take a good look at your DTMF code as I was actually thinking along those lines. Just a case of extend the 4 x 4 tones out to 16 x 16 tones, do a lot of testing to separate enough to give a good drift error comparator. Probably use a couple of single tones as a handshake to signal sta...
by idle
Sat Oct 09, 2021 11:58 pm
Forum: General Discussion
Topic: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones
Replies: 6
Views: 893

Re: Wondering if anybody might be able to point me to a way with PB to Encode / Decode Tones

I did a dtmf tone thing for windows xp a while back,
see here
viewtopic.php?p=302318#p302318

and if you want the src send a pm
by idle
Sun Oct 03, 2021 3:56 am
Forum: Coding Questions
Topic: Strange behavior of Base64 or something else?
Replies: 7
Views: 809

Re: Strange behavior of Base64 or something else?

not sure what was going on there but doesn't make much sense to xor it with more than just the key. Procedure XOrCrypt(*Buffer,Len.l, KeyS.i, KeyE.i) ;just some weird xor encryption algorithm by JLC Protected i, Byte.b, KeyByte.b Protected KeyLength = KeyE - KeyS, KeyPos For i=0 To Len-1 Byte = Peek...
by idle
Sun Sep 26, 2021 11:04 pm
Forum: Assembly Programming
Topic: [SOLVED] Trying to make AbsInt()
Replies: 16
Views: 2280

Re: [SOLVED] Trying to make AbsInt()

This should work out better than a conditional jmp Macro mabsint(var) EnableASM mov rdx, var mov rax, rdx neg rax CMOVl rax,rdx mov var,rax DisableASM EndMacro Procedure absint(a.i) !mov rdx,[p.v_a] !mov rax, rdx !neg rax !CMOVl rax,rdx ProcedureReturn EndProcedure a=-42 mabsint(a) Debug a Debug abs...
by idle
Mon Sep 20, 2021 4:50 am
Forum: Coding Questions
Topic: Private Public Key String Encryption?
Replies: 4
Views: 844

Re: Private Public Key String Encryption?

Person A creates a key and gives it to x number of people. then they all can encrypt something with that key but they can not decrypt it again with the key once it is encrypted. then they all can send the encrypted message back to person A who can only decrypt it. maybe this helps A generates his k...
by idle
Sat Sep 18, 2021 11:56 pm
Forum: Coding Questions
Topic: Private Public Key String Encryption?
Replies: 4
Views: 844

Re: Private Public Key String Encryption?

There also a port of Curve25519 elliptic curve, public key function for use in Dieffie-Hellman key exchange https://www.purebasic.fr/english/viewtopic.php?f=12&t=55892 client = modEC::NewEC("salt n pepper") ;Create new EC context with out of channel passphrase server = modEC::NewEC(&qu...
by idle
Thu Sep 02, 2021 6:41 am
Forum: Off Topic
Topic: Very important!
Replies: 14
Views: 5870

Re: Very important!

so what's next
Image
by idle
Thu Aug 26, 2021 7:41 am
Forum: Coding Questions
Topic: [Solved] Fastest way to find text in a folder of many files?
Replies: 12
Views: 820

Re: Fastest way to find text in a folder of many files?

Sorry if it doesn't look very basic like. I can do a demo tomorrow, I'm off for the evening. You can use this to scan for a list of candidate files for instance. CompilerIf #PB_Compiler_OS = #PB_OS_Windows #Cdir = "\" CompilerElse #Cdir = "/" CompilerEndIf Structure FileDate Crea...
by idle
Thu Aug 26, 2021 6:01 am
Forum: Coding Questions
Topic: [Solved] Fastest way to find text in a folder of many files?
Replies: 12
Views: 820

Re: Fastest way to find text in a folder of many files?

you could try modifying this example with or without the trie. The trie is good if you're looking for multiple needles/items. you could also use regular expressions which would probably work out just as fast or maybe faster as it does much the same as what the Trie does. squint.pbi here https://www....
by idle
Fri Aug 20, 2021 12:40 am
Forum: Windows
Topic: Jumplist
Replies: 3
Views: 2763

Re: Jumplist

Do you mean a jumptable? you have to manually make them if that's what you want.
by idle
Wed Aug 18, 2021 2:52 am
Forum: Tricks 'n' Tips
Topic: Bloom filter x64
Replies: 3
Views: 1966

Re: Bloom filter x64

Thanks kcc, try it without the debugger As an explanation for those that don't mind TLDR A bloom filter basically provides a fast test to see if an item exists in a set. Compered to a map the bloom uses at least 4 times less memory and the longer the key the more efficient the bloom is as the map al...
by idle
Tue Aug 10, 2021 10:42 pm
Forum: Tricks 'n' Tips
Topic: Bloom filter x64
Replies: 3
Views: 1966

Bloom filter x64

A high throughput bloomfilter. https://en.wikipedia.org/wiki/Bloom_filter bloom items = 10,000,000 memory = 74.20 mb bloom get = 10,000,000 max false positives expected = 10,000 actual 9,943 Bloom set 1.72 seconds Bloom get 1.73 seconds map set 5.69 seconds map get 4.26 seconds bloom items = 50,000,...