Code: Select all
cryptoStream:Write(decrypted, 1, decrypted:Length)
Code: Select all
PUBLIC METHOD TransformBlock(inputBuffer AS BYTE[] , inputOffset AS LONG , inputCount AS LONG , outputBuffer AS BYTE[] , outputOffset AS LONG ) AS LONG
LOCAL i AS LONG
LOCAL b AS BYTE
//
i := 0
WHILE i < inputCount
i++ // Index starts with 1 not 0!
IF SELF:NeedMoreXorMaskBytes()
SELF:EncryptCounterThenIncrement()
ENDIF
b := SELF:_xorMask:Dequeue()
outputBuffer[outputOffset + i] := (BYTE)(inputBuffer[inputOffset + i] ^ b)
// i++
ENDDO
RETURN inputCount
Code: Select all
EncryptAES256_CTR(@@array, OUT encrypted , Convert.FromBase64String(aeskey), kassa, renr)
? "encrypted.Length", encrypted.Length // => Länge 8
FOREACH x AS BYTE IN encrypted
? x // => alle 8 Elemente sind 0
NEXT