GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ZeroLP/SecureStringNAOT: Compile time string encryption with NativeAOT

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
SecureStringNAOT
SecureStringNAOT
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AfterDecryption.jpg
AfterDecryption.jpg
 
 
BeforeDecryption.jpg
BeforeDecryption.jpg
 
 
HexeditorStaticAnalysis.jpg
HexeditorStaticAnalysis.jpg
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

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

csharpdotnetencryptionnaotnativeaotnet7poc

Resources

Readme
GPL-3.0 license
Activity

Stars

31 stars

Watchers

2 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.