Page 1 of 1

encryption

Posted: 08 Mar 2020 09:03
by swan_x
we have encryption function on xy?
or does anyone here know an existing script to do this?

Re: encryption

Posted: 08 Mar 2020 12:51
by highend
formatlist()
param On format x: Seeds the randomizer used for shuffling. Can be any number. If a seed is passed, the randomizer always generates the same random sequence for this seed.

Re: encryption

Posted: 08 Mar 2020 14:23
by swan_x
hi highend, i think i understand that the formalist is only relative to text, or perhaps also to file?

Re: encryption

Posted: 08 Mar 2020 15:46
by highend
It's text only

Re: encryption

Posted: 09 Mar 2020 05:56
by jaywalker32
I use this small script to quickly encrypt list of files or folders, using gpg (https://gnupg.org/download/index.html)

Any folders are added to a zip file first before encrypting.


Code: Select all

	foreach($file, <selitems |>){
		if(exists($file) == 2){  //if folder, add to zip first
			zip_add(gpc($file, "base").".zip", $file);
			$file = gpc($file, "base").".zip";
		}
		run "gpg -er ""jaywalkerr32"" """.gpc($file, "name")."""", , 1, 2;
	}
and for decrypting

Code: Select all

	foreach($file,<selitems |>){
		run "gpg -do """.gpc($file, "base").""" """.$file."""", , 1, 2;	
	}

Re: encryption

Posted: 09 Mar 2020 08:42
by swan_x
oh great jaywalker32!
tanxs for this share