This commit is contained in:
Leonetienne 2021-12-06 03:34:47 +01:00
parent 7b4d1ea9ee
commit 75c64329a4
3 changed files with 10 additions and 8 deletions

View File

@ -141,14 +141,14 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Feistel.cpp" /> <ClCompile Include="Feistel.cpp" />
<ClCompile Include="GhettoCipherWrapper.cpp" /> <ClCompile Include="GhettoCryptWrapper.cpp" />
<ClCompile Include="Cipher.cpp" /> <ClCompile Include="Cipher.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Block.h" /> <ClInclude Include="Block.h" />
<ClInclude Include="Config.h" /> <ClInclude Include="Config.h" />
<ClInclude Include="Feistel.h" /> <ClInclude Include="Feistel.h" />
<ClInclude Include="GhettoCipherWrapper.h" /> <ClInclude Include="GhettoCryptWrapper.h" />
<ClInclude Include="Cipher.h" /> <ClInclude Include="Cipher.h" />
<ClInclude Include="Flexblock.h" /> <ClInclude Include="Flexblock.h" />
<ClInclude Include="Halfblock.h" /> <ClInclude Include="Halfblock.h" />

View File

@ -18,10 +18,10 @@
<ClCompile Include="Feistel.cpp"> <ClCompile Include="Feistel.cpp">
<Filter>Quelldateien</Filter> <Filter>Quelldateien</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="GhettoCipherWrapper.cpp"> <ClCompile Include="Cipher.cpp">
<Filter>Quelldateien</Filter> <Filter>Quelldateien</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Cipher.cpp"> <ClCompile Include="GhettoCryptWrapper.cpp">
<Filter>Quelldateien</Filter> <Filter>Quelldateien</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
@ -47,14 +47,14 @@
<ClInclude Include="Flexblock.h"> <ClInclude Include="Flexblock.h">
<Filter>Headerdateien</Filter> <Filter>Headerdateien</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="GhettoCipherWrapper.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="Version.h"> <ClInclude Include="Version.h">
<Filter>Headerdateien</Filter> <Filter>Headerdateien</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Cipher.h"> <ClInclude Include="Cipher.h">
<Filter>Headerdateien</Filter> <Filter>Headerdateien</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="GhettoCryptWrapper.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -12,6 +12,7 @@ This way this provides relatively good diffusion.
* It's slow * It's slow
* It's probably super insecure * It's probably super insecure
* It leaves your keys sprinkled in ram * It leaves your keys sprinkled in ram
* Short 128-bit keys🤦
* But the syntax is pythonlike easy🙇 * But the syntax is pythonlike easy🙇
It's pretty ghetto, you know? It's pretty ghetto, you know?
@ -54,7 +55,8 @@ GhettoCryptWrapper::EncryptFile("main.cpp", "main.cpp.crypt", "password1");
GhettoCryptWrapper::DecryptFile("main.cpp.crypt", "main.cpp.clear", "password1"); GhettoCryptWrapper::DecryptFile("main.cpp.crypt", "main.cpp.clear", "password1");
``` ```
If you want to do more complex stuff use the cipher-class [`GhettoCipher::Cipher`](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Cipher.h) aswell as the conversion methods in [Util.h](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Util.h). This way you can cipher on bitlevel. Examples on how to do this are in [GhettoCryptWrapper.cpp](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/GhettoCipherWrapper.cpp). If you want to do more complex stuff, use the cipher-class [`GhettoCipher::Cipher`](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Cipher.h) aswell as the conversion methods in [Util.h](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/Util.h). This way you can cipher on bitlevel. Examples on how to do this are in [GhettoCryptWrapper.cpp](https://github.com/Leonetienne/GhettoCrypt/blob/master/GhettoCrypt/GhettoCipherWrapper.cpp).
This way you could, for example, decrypt an ecrypted file directly into memory. Or use a full-length key instead of a password.
Without saying, this is more advanced and not as-easy as the methods supplied in the wrapper. Without saying, this is more advanced and not as-easy as the methods supplied in the wrapper.
### I am not kidding, don't use this for critical stuff! Homebrew ciphers are most often shit! ### I am not kidding, don't use this for critical stuff! Homebrew ciphers are most often shit!