for i := 1 to StrLen(myTextToEncrypt) do begin
if i = 215 then begin
tempStringList.Add(tempString);
tempString:= '';
i := 1;
end
else begin
if myTextToEncrypt= '' then begin
tempStringList.Add(tempString);
break;
end;
tempString+= myTextToEncrypt[1];
myTextToEncrypt:= DelStr(myTextToEncrypt, 1, 1)
end;
end;
for i := 1 to tempStringList.Count do begin
tempString:= EncryptText(tempStringList.Get(i));
secondListOfText.Add(tempString);
end;
for i := 1 to secondListOfText.Count do begin
tempvar2 := Decrypt(secondListOfText.Get(i));
finalListOfStrings.Add(tempString);
end;
So what I did was split the original string up into lists of text[215] and by adding 1 char at a time to the new entry and then deleting that char
from the original text, I'd end up with my original string seperated into X amount of text[215].
Each iteration I think if the original string is empty to make sure that even if remaining text is less than 215 chars,
it will still complete and not alter the text.
All that you'd have to do then was run through the list and encrypt each of them. They do however need to kept seperated until
​​​​​​​they've been decrypted again.
This is an extremely hacky solution, and a desperate one.
It did however not work for me because seeing as we are using cloud Business Central I could not export the encryption key and niether do we know
which encryption was used, so I could not decrypt it in a .net project, as far as I know.
Hope this may help someone in the future.