FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ZeroLP/SecureStringNAOT: Compile time string encryption with NativeAOT · GitHub

Repository files navigation

SecureStringNAOT

Compile time string encryption with NativeAOT

This example utilises the fact that the static constructors including static readonly fields are pre-interpreted at compile time when the ILC(NativeAOT compiler) translates the code into native code.

Limitation

As the strings are a reference-type that are allocated on the heap, they are ultimately baked statically into the compiled executable. Therefore, only stack allocated Span<char> can be encrypted. Any solution is welcomed via PR, however I have yet to find a viable solution as the issue tightly relates to how strings work in .NET.

Before Decryption

After Decryption

About

Compile time string encryption with NativeAOT

Topics

Resources

Stars

32 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL