string encryption
qznc via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 1 15:55:21 PDT 2016
On Friday, 1 July 2016 at 22:23:23 UTC, Hiemlick Hiemlicker wrote:
> It seems D won't replace
>
> encrypt("This string will still end up in the binary");
>
> with "skadf2903jskdlfaos;e;fo;aisjdfja;soejfjjfjfjfjfjfeij" or
> whatever the ctfe value of encrypt actually is.
>
> This also seems like a bug in D because manifest constants used
> as sole arguments to ctfe'able functions should be replaced by
> the function result.
CTFE is explicit. You could make it `encrypt!"encrypted at
compile-time"`. Then let encrypt return some struct, which
decrypts at runtime.
More information about the Digitalmars-d
mailing list