1
0
mirror of https://github.com/kepler155c/opus synced 2024-11-05 08:26:16 +00:00
opus/sys/apps/password.lua

11 lines
290 B
Lua
Raw Normal View History

local Security = require('opus.security')
local SHA = require('opus.crypto.sha2')
local Terminal = require('opus.terminal')
2017-05-05 11:34:20 +00:00
2017-05-10 10:11:25 +00:00
local password = Terminal.readPassword('Enter new password: ')
2017-05-05 11:34:20 +00:00
2017-05-10 10:11:25 +00:00
if password then
2019-06-28 10:33:47 +00:00
Security.updatePassword(SHA.compute(password))
2018-01-24 22:39:38 +00:00
print('Password updated')
2017-05-10 10:11:25 +00:00
end