Keys generated from passwords are now padded right-handedly
This commit is contained in:
parent
4dc402e2e6
commit
d3ad38a7fa
@ -206,7 +206,9 @@ namespace GhettoCipher
|
|||||||
|
|
||||||
// Segment the password in segments of key-size, and xor them together.
|
// Segment the password in segments of key-size, and xor them together.
|
||||||
for (std::size_t i = 0; i < in.size(); i += BLOCK_SIZE / 8)
|
for (std::size_t i = 0; i < in.size(); i += BLOCK_SIZE / 8)
|
||||||
b ^= StringToBitblock(in.substr(i, BLOCK_SIZE / 8));
|
b ^= StringToBitblock(
|
||||||
|
PadStringToLength(in.substr(i, BLOCK_SIZE / 8), BLOCK_SIZE / 8, 0, false)
|
||||||
|
);
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user