encrypted_save
proc/Decrypt()
var/file_text = file2text("[name]")
if(decrypt_reference && decrypt_method) file_text = call(decrypt_reference, decrypt_method) (file_text, key)
else if(decrypt_method) file_text = call(decrypt_method) (file_text, key)
fdel("[name]")
savefile = new(name)
savefile.ImportText(file_text)
world << file_text
world << savefile.ExportText()
name = savefile.name
dir = savefile.dir
Problem description:
I'm currently in the process of rewriting my pif_EncryptedSave library, and I'm nearly complete. Problem is, something seems to be up with savefile.ImportText(). With those bits of output, I get the following:
age = 20
full_name = "John Doe"
height = "5'6\""
weight = "120 lbs"
key = "The Fizz Meister"
ckey = "thefizzmeister"
\nage\ \=\ 20\nfull_name\ \=\ \"John\ Doe\"\nheight\ \=\ \"5\'6\\\"\"\nweight\ \=\ \"120\ lbs\"\nkey\ \=\ \"The\ Fizz\ Meister\"\nckey\ \=\ \"thefizzmeister\"\n
I'm running this off the demo code, and I'm using Air Mapster's (Mike H's) RC5 library for it. I can't figure out why savefile.ImportText() is causing that. As you can see, somehow everything is getting escaped.
Also, why are you naming your savefile "savefile"? Isn't that a reserved word?