JustasMasiulis / xorstr

heavily vectorized c++17 compile time string encryption.
Apache License 2.0
1.19k stars 193 forks source link

str not embedded to code #50

Closed llxiaoyuan closed 2 years ago

llxiaoyuan commented 2 years ago
#include <stdio.h>
#define JM_XORSTR_DISABLE_AVX_INTRINSICS
#include "xorstr.hpp"
int main() {
    printf(xorstr_(
        "0123456789qwertyuiopasdfghjklzxcvbnm"
        "cawnwaopnwaoncaowdnawopdnwqpodnwqdn4"
        "cvabnicawndoiwabdiawdnaiwndawiodnwai"
        "va4w9v16aw1v6aw4f6aw4fga16gv1va61vvw"
        "w79r44t6h16t1h61r6n1r4h9rur16br15z1a"
        "qr9h19t9n19161fa4w9f6sdg4sh4e61h6se4"
        "n6yj6t1jt1h4d6g1we61q6g161h61f94u6f1"
        "q494f6es1h9ehe6sf49wag16e4g16a4fw6af"
        "cwa1f6s6g1a6wgv1va6wfv1wa491f6qa1f6a"
        "heea1q6d16a4q67f6se1yr3u41g3n16g4wa6"
        "4ter61h61a64dw6f1e64g16ee1a6f4wa16f1"
        "q9r46sg16s1ag6es6ge19e41cz3s1fw4f9w1"
        "caw16wgv6aw4g6w4gw16svv6w41caw649t7a"
        "g4waf16wa4f1a6wgaw44r96y16rrfu4f61bf"// ! ! ! add this line, will not embedded
        "\n"
    ));
    return 0;
}

image

JustasMasiulis commented 2 years ago

What compiler is this? MSVC?

I'll look into this, thanks 👍

llxiaoyuan commented 2 years ago

Visual Studio 2019 (v142), default compiler setting

JustasMasiulis commented 2 years ago

I think I fixed it. Can you check now?

llxiaoyuan commented 2 years ago

thanks sir, it works, awesome volatile ! ! !