7 lines
195 B
Lua
7 lines
195 B
Lua
local tA = {...}
|
|
local s=os.gensalt(16)
|
|
tA[1] = tA[1] or os.getuid()
|
|
io.write("New password for "..tA[1]..": ")
|
|
os.setuattr(tA[1],"hpass",sha.sha256(io.read("*")..s))
|
|
os.setuattr(tA[1],"salt",s)
|