#51 crypto system

This commit is contained in:
Mikayla Fischler
2022-05-29 15:05:57 -04:00
parent e65a1bf6e1
commit 309ba06f8a
24 changed files with 3746 additions and 0 deletions

19
lockbox/padding/zero.lua Normal file
View File

@@ -0,0 +1,19 @@
local ZeroPadding = function(blockSize, byteCount)
local paddingCount = blockSize - ((byteCount -1) % blockSize) + 1;
local bytesLeft = paddingCount;
local stream = function()
if bytesLeft > 0 then
bytesLeft = bytesLeft - 1;
return 0x00;
else
return nil;
end
end
return stream;
end
return ZeroPadding;