some sneaky semicolons

This commit is contained in:
Mikayla Fischler 2022-10-20 13:59:35 -04:00
parent 788fae44aa
commit 93286174d4
3 changed files with 17 additions and 17 deletions

View File

@ -3,13 +3,13 @@
--
local aes128 = require("lockbox.cipher.aes128")
local ctr_mode = require("lockbox.cipher.mode.ctr");
local sha1 = require("lockbox.digest.sha1");
local sha2_224 = require("lockbox.digest.sha2_224");
local sha2_256 = require("lockbox.digest.sha2_256");
local ctr_mode = require("lockbox.cipher.mode.ctr")
local sha1 = require("lockbox.digest.sha1")
local sha2_224 = require("lockbox.digest.sha2_224")
local sha2_256 = require("lockbox.digest.sha2_256")
local pbkdf2 = require("lockbox.kdf.pbkdf2")
local hmac = require("lockbox.mac.hmac")
local zero_pad = require("lockbox.padding.zero");
local zero_pad = require("lockbox.padding.zero")
local stream = require("lockbox.util.stream")
local array = require("lockbox.util.array")
@ -52,13 +52,13 @@ function crypto.init(password, server_port)
c_eng.cipher = ctr_mode.Cipher()
c_eng.cipher.setKey(c_eng.key)
c_eng.cipher.setBlockCipher(aes128)
c_eng.cipher.setPadding(zero_pad);
c_eng.cipher.setPadding(zero_pad)
-- initialize decipher
c_eng.decipher = ctr_mode.Decipher()
c_eng.decipher.setKey(c_eng.key)
c_eng.decipher.setBlockCipher(aes128)
c_eng.decipher.setPadding(zero_pad);
c_eng.decipher.setPadding(zero_pad)
-- initialize HMAC
c_eng.hmac = hmac()
@ -222,7 +222,7 @@ function crypto.secure_modem(modem)
if hmac == computed_hmac then
-- message intact
local plaintext = crypto.decrypt(iv, ciphertext)
body = textutils.deserialize(plaintext)
body = textutils.unserialize(plaintext)
if body == nil then
-- failed decryption

View File

@ -222,7 +222,7 @@ end
---@param color integer
---@return boolean valid
function rsio.is_color(color)
return util.is_int(color) and (color > 0) and (_B_AND(color, (color - 1)) == 0);
return util.is_int(color) and (color > 0) and (_B_AND(color, (color - 1)) == 0)
end
-----------------

View File

@ -3,18 +3,18 @@ require("/initenv").init_env()
local pbkdf2 = require("lockbox.kdf.pbkdf2")
local AES128Cipher = require("lockbox.cipher.aes128")
local HMAC = require("lockbox.mac.hmac")
local SHA1 = require("lockbox.digest.sha1");
local SHA2_224 = require("lockbox.digest.sha2_224");
local SHA2_256 = require("lockbox.digest.sha2_256");
local SHA1 = require("lockbox.digest.sha1")
local SHA2_224 = require("lockbox.digest.sha2_224")
local SHA2_256 = require("lockbox.digest.sha2_256")
local Stream = require("lockbox.util.stream")
local Array = require("lockbox.util.array")
local CBCMode = require("lockbox.cipher.mode.cbc");
local CFBMode = require("lockbox.cipher.mode.cfb");
local OFBMode = require("lockbox.cipher.mode.ofb");
local CTRMode = require("lockbox.cipher.mode.ctr");
local CBCMode = require("lockbox.cipher.mode.cbc")
local CFBMode = require("lockbox.cipher.mode.cfb")
local OFBMode = require("lockbox.cipher.mode.ofb")
local CTRMode = require("lockbox.cipher.mode.ctr")
local ZeroPadding = require("lockbox.padding.zero");
local ZeroPadding = require("lockbox.padding.zero")
local comms = require("scada-common.comms")
local util = require("scada-common.util")