Jump to content

plastkort

Members
  • Content Count

    41
  • Joined

  • Last visited

Posts posted by plastkort


  1. On 8/5/2019 at 1:54 AM, David Schwartz said:

    WARNING: Mitov's library installs both debug and release libs for every possible platform on your version of Delphi. It does take up quite a bit of disk space! But you can safely go through and delete the platform libs you won't need.

     

    yeah it also modified my entire delphi IDE 😕 not cool

     


  2. Have been digging everywhere around the web for a solution that allows me to play simple wave files simultaneously... 

     

    i found some examples but none of them works

     

    soundplay works with only a single file at a time even if i create them in a TThread, i tried to change and tweak it, but for now i have given up, 

     

    so now I am asking if anyone of you have experience with this before, any library that can help, i am not really interrested in using an external program as a via shell execute since it can slow things down.

     

    would be perfect if there was a working windows API that just plays the sound and with no hassle.. 

     

    mciSendString does not work at all either for me

     

     

     

     

     

     

     


  3. im trying to use a very old component i made for delphi 7 back in the days, i havent touched it for many years. but it installed ok without a problem,

     

    however when i go to the component list and want to add it.. it seems to be "faded" and cannot be added... why is it so ?

     

    it works if i create a new application and try to add it...

     

    cannotuse.png


  4. 52 minutes ago, Angus Robertson said:

    There is an example in the same unit, IcsJoseGetSig.  There is also a sample project OverbyteIcsJoseTst.dpr that is used to test the various Jose functions, including hex, base64 and base64url encoding and decoding. 

     

    But this unit needs the OpenSSL DLLs to be distributed with your application, as does any use of SSL or encryption in ICS.  And you need to initialise OpenSSL before calling those functions, see the sample application.  

     

    As others mentioned, there are Delphi only implementations of SHA256, but IcsHMACDigest more modern digests as well.  and most REST applications need HTTPS.

     

    I have delphi 10.2 maybe it does not have this library


  5. On 7/27/2019 at 10:34 AM, Angus Robertson said:

    This is avaiIable in the OverbyteIcsSslJose unit:

     

    { digests and hashes - note all digests are binary bytes in AnsiStrings }
    function IcsHMACDigest(const Data, Key: AnsiString;   HashDigest: TEvpDigest = Digest_sha256): AnsiString;
     function IcsHMACDigestEx(const Data, Key: AnsiString;  HashDigest: TEvpDigest = Digest_sha256): AnsiString;
    function IcsHMACDigestVerify(const Data, Key, OldDigest: AnsiString; HashDigest: TEvpDigest = Digest_sha256): Boolean;
     

    With various other functions used for Json Object Signing and Encryption,

     

    Angus

     

    do you have any example on this one?

     

    I got error could not find libeau.. but i can use tsslwsocket, maybe something missing

     


  6. hi!.

     

    This is perhaps not the best way to do it, but it sort of works for me, except that I am seems to receive some garbage characters and unwanted characters in the beginning of the received string.

     

    Am i doing something wrong?

     

     

    #$0081'~'#1'%{"table":"trade","action":"insert"}'

     

    and other garbage characters

    #$0081'~'#1#$18

     

    is there a bug in TSSLWsocket or is this by design in json structure?

     

    I also have trouble receive very large json strings. it seem to be incomplete.. a workaround i have is to add lineend as #93#125  which is ]}

     

     

    are there other updated websocket libraries using TWSocket or indy ?

    i know there are one but its not maintenanced anymore

     


  7. 13 minutes ago, stijnsanders said:

    I copied the reference code for sha256 and hmac to Delphi once, have a look if you can make these work for you: http://yoy.be/md5.html

    thanks, I will take a look at this, as an alternative i have been looking into python, and i see there are a component for integrating python scripts.. that opens many possibilities as well

     


  8. hi!

     

    I have been playing with the tought on playing with websockets and rest API. i got the documentation on how to connect but encrypion stuff is hard to swallow, is there any tricks on how to solve this little easter egg ?

     

    var

      param_str : string;

      secret : string;

    begin

       Secret := 't7T0YlFnYXk0Fx3JswQsDrViLg1Gh3DUU5Mr';

       param_str  :=  'api_key=B2Rou0PLPpGqcU0Vu2&leverage=100&symbol=BTCUSD&timestamp=1542434791000';

       sign := hex(HMAC_SHA256($secret, $param_str));

    end;

     

       result should be 

       sign = 670e3e4aa32b243f2dedf1dafcec2fd17a440e71b05681550416507de591d908
     

    any solution is OK, but cannot affford anything that costs... 

     

    help 🤪🤪

×