Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

xorstr

> 编程语言
Open source

heavily vectorized c++17 compile time string encryption.

1.4K stars0 likes1 views
WebsiteGitHub

About

heavily vectorized c++17 compile time string encryption.

xorstr

A heavily vectorized c++17 compile time string encryption.

quick example

cpp
int main() {
    std::puts(xorstr_("an extra long hello_world"));
}

API

…

noteworthy things

  • All keys are 64bit and generated during compile time.
  • Data blocks go in increments of 16 bytes so some space may be wasted.
  • The code has been crafted so that all the data would be embedded directly into code and not stored on .rdata and such.
  • The entirety of string encryption and decryption will be inlined.

supported compilers and platforms

Tested to be working on clang 5.0+, gcc 7.1+ and MSVC v141. If your CPU does not support AVX define JM_XORSTR_DISABLE_AVX_INTRINSICS to only use SSE.

example assembly output

Output of gcc (trunk) from the quick example

…

Issues· 4 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++compile-timecppcpp17encryption

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言