Skip to content

Commit

Permalink
refactor: rename eco.crypto. to eco.hash.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 8, 2023
1 parent b5b1018 commit 148ba71
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ install(

install(
TARGETS sha1 md5
DESTINATION ${LUA_INSTALL_PREFIX}/eco/crypto
DESTINATION ${LUA_INSTALL_PREFIX}/eco/hash
)

install(
Expand Down
2 changes: 1 addition & 1 deletion examples/crypto/md5.lua → examples/hash/md5.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env eco

local md5 = require 'eco.crypto.md5'
local md5 = require 'eco.hash.md5'
local hex = require 'eco.encoding.hex'

local ctx = md5.new()
Expand Down
2 changes: 1 addition & 1 deletion examples/crypto/sha1.lua → examples/hash/sha1.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env eco

local sha1 = require 'eco.crypto.sha1'
local sha1 = require 'eco.hash.sha1'
local hex = require 'eco.encoding.hex'

local ctx = sha1.new()
Expand Down
2 changes: 1 addition & 1 deletion md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static int lua_md5_new(lua_State *L)
return 1;
}

int luaopen_eco_crypto_md5(lua_State *L)
int luaopen_eco_hash_md5(lua_State *L)
{
lua_newtable(L);

Expand Down
2 changes: 1 addition & 1 deletion sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int lua_sha1_new(lua_State *L)
return 1;
}

int luaopen_eco_crypto_sha1(lua_State *L)
int luaopen_eco_hash_sha1(lua_State *L)
{
lua_newtable(L);

Expand Down
2 changes: 1 addition & 1 deletion websocket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Referenced from https://github.com/openresty/lua-resty-websocket

local base64 = require 'eco.encoding.base64'
local sha1 = require 'eco.crypto.sha1'
local sha1 = require 'eco.hash.sha1'
local http = require 'eco.http'
local url = require 'eco.url'
local sys = require 'eco.sys'
Expand Down

0 comments on commit 148ba71

Please sign in to comment.