]> Repositorios git - scryer-prolog.git/commit
ENHANCED: library(crypto): Retain a compact internal representation of the ciphertext...
authorMarkus Triska <[email protected]>
Mon, 17 Jan 2022 21:00:50 +0000 (22:00 +0100)
committerMarkus Triska <[email protected]>
Mon, 17 Jan 2022 22:02:56 +0000 (23:02 +0100)
commit516ed1fd5b4768b02580344f016a0b37d2f064a3
tree94d4cc00fd60efb4c632b5452f5326f2ee1ca957
parentc6400550e117e59f7383717195ec72fd1f095937
ENHANCED: library(crypto): Retain a compact internal representation of the ciphertext throughout decryption.

This allows efficient decryption also of very large files and long
strings.

It is usually highly advisable to stick to common and portable library
predicates such as append/3. However, since append/3 does not yet
recognize this opportunity for improvement, I apply it manually in
this case, so that also very large files can be efficiently decrypted
using the compact internal string representation.

Without this change, decrypting a 1 GB file takes 48 GB of RAM,
whereas with this change, it only takes 2 GB (one for the string, one
for its copy with the appended tag).
src/lib/crypto.pl