Initial commit

This commit is contained in:
2021-10-30 17:37:06 +03:00
commit 54f368e205
5 changed files with 267 additions and 0 deletions

19
i_know_my_crc32.lua Normal file
View File

@@ -0,0 +1,19 @@
local crc32 = require 'crc32'
local this_file = 'i_know_my_crc32.lua'
function read_all(file)
local f = assert(io.open(file, "rb"))
local content = f:read("*all")
f:close()
return content
end
local content = read_all(this_file)
local crc32_result = crc32.hash(content)
local crc32_expected = ''
print('My expected crc32 checksum is ' .. crc32_expected)
print('My own crc32 checksum is ' .. crc32_result)
local match = crc32_result == crc32_expected
return match