1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:40:05 +08:00
SpaceVim/lua/spacevim/api/password.lua
2023-06-24 21:13:03 +08:00

18 lines
353 B
Lua

--!/usr/bin/lua
local M = {}
function M.generate_simple(len) -- {{{
local temp = vim.split('abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ', '')
local ps = {}
local i = 0
while i < len do
table.insert(ps, temp[math.random(#temp)])
i = i + 1
end
return table.concat(ps, '')
end
-- }}}
--
--
return M