string encryption

Hiemlick Hiemlicker via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 1 18:49:20 PDT 2016


On Saturday, 2 July 2016 at 00:29:45 UTC, Adam D. Ruppe wrote:
> On Saturday, 2 July 2016 at 00:05:14 UTC, Hiemlick Hiemlicker 
> wrote:
>> Is there a way to write a wrapper around such that
>>
>> mystring s = "a string that will be converted and not appear 
>> in binary";
>> writeln(s);
>
> You just need to put a `string toString() { return whatever; }` 
> function on `mystring`

Thanks. That did the trick.

No unencrypted string in the binary and hopefully a drop in 
replacement for string.

Although, iteration of a string that was encrypted could be 
problematic.

I'll have to be careful where I use this.









More information about the Digitalmars-d mailing list