Jump to content

_Crypt_EncryptData slow stream of data

Recommended Posts

i'm working on a simple chat client so i can chat direcly ip <--> ip but i want to log my chats and encrypt them, I don't want to create a log and encrypt every msg separately (creating a patern in the logs)

i was trying to understand the _Crypt_EncryptData func with the false flag but fail to understand it, here is encryption test

$vCryptKey = "CryptPassword"
$iAlgID = $CALG_AES_128

$vCryptKey = _Crypt_DeriveKey($vCryptKey, $iAlgID)
$EncryptData = ""
for $x=1 to 3
    $data = random(100,999,1)&"-" ;some random data to simulate a stream of data
    $EncryptData &= _Crypt_EncryptData($data, $vCryptKey, $CALG_USERKEY, False)
    if @error then ConsoleWrite('@error='&@error&"  @extended"&@extended &@lf)

;decrypt $sOutput
$DecryptData = _Crypt_DecryptData($EncryptData, $vCryptKey, $CALG_USERKEY)



Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...