Skip to content

Commit 58cff25

Browse files
committed
Updated README
1 parent 481c96d commit 58cff25

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ formatted text as HTML.
99
### Features
1010
- Markdown Formatting
1111
- Markdown syntax highlighting
12+
- Note encryption/decryption
1213
- Export to HTML
1314
- Copy selection as HTML
1415
- Save as .md

src/encryption.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ std::string Encryption::encrypt(std::string content, std::string passphrase) {
88
byte iv[AES::BLOCKSIZE];
99
prng.GenerateBlock(iv, sizeof(iv));
1010
std::string ivString(reinterpret_cast< char const* >(iv));
11-
SecByteBlock key(AES::MAX_KEYLENGTH+AES::BLOCKSIZE);
11+
SecByteBlock key(AES::MAX_KEYLENGTH + AES::BLOCKSIZE);
1212

1313
std::string encrypted, output;
1414

@@ -39,11 +39,11 @@ std::string Encryption::decrypt(std::string content, std::string passphrase) {
3939
if (base64Decoded.substr(0, 9) != "encrypted")
4040
return "";
4141

42-
unsigned first = base64Decoded.find("encrypted") + 9; // 9 = encrypted length
42+
unsigned first = base64Decoded.find("encrypted") + 9; // 9 = "encrypted" length
4343
unsigned last = base64Decoded.find("__ENDIV");
4444
ivString = base64Decoded.substr(first, last - first);
4545

46-
first = base64Decoded.find("__ENDIV") + 7; // 7 = __ENDIV length
46+
first = base64Decoded.find("__ENDIV") + 7; // 7 = "__ENDIV" length
4747

4848
base64Decoded = base64Decoded.substr(first);
4949

0 commit comments

Comments
 (0)