Skip to content

Commit

Permalink
Fix for 32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kürzeder committed Jul 27, 2019
1 parent 0d48fdc commit a3a0c22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module/CFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int CFunctions::sign_jwt_token(lua_State* lua_vm)

// Read other arguments
const auto claims = Utils::parse_named_table(lua_vm, 2);
const auto algorithm = jwt_algorithm(reinterpret_cast<uint64_t>(lua_touserdata(lua_vm, 3)));
const auto algorithm = jwt_algorithm(reinterpret_cast<size_t>(lua_touserdata(lua_vm, 3)));
const auto private_key_path = lua_tostring(lua_vm, 4);
std::string private_key = private_key_path;

Expand Down
4 changes: 2 additions & 2 deletions module/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ static const int index_key = -2;
#define DEBUG_LOG( msg )
#endif

enum jwt_algorithm : uint64_t
enum jwt_algorithm : size_t
{
jwt_algorithm_none = 0x123456789ABCDEF,
jwt_algorithm_none = 0x12345678ABCDEF,
jwt_algorithm_hs256 = jwt_algorithm_none << 1,
jwt_algorithm_hs384 = jwt_algorithm_none << 2,
jwt_algorithm_hs512 = jwt_algorithm_none << 3,
Expand Down

0 comments on commit a3a0c22

Please sign in to comment.