Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PC-Logix/OpenSecurity
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 88c3373f5499
Choose a base ref
...
head repository: PC-Logix/OpenSecurity
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9783f5e4b737
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 8, 2015

  1. Copy the full SHA
    9783f5e View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/resources/assets/opensecurity/lua/datablock/lib/datablock.lua
Original file line number Diff line number Diff line change
@@ -5,14 +5,14 @@ local datablock = {}
-------------------------------------------------------------------------------
-- Converts binary data into hexadecimal string.
function datablock.toHex(data)
return (datablock:gsub('.', function (c)
return (data:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))
end

-- Converts hexadecimal string into binary data.
function datablock.fromHex(hex)
return (datablock:gsub('..', function (cc)
return (data:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end