1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-17 13:48:05 +00:00

crypto cleanup

This commit is contained in:
kepler155c@gmail.com
2019-06-28 06:33:47 -04:00
parent bcd33af599
commit c3d52c1aab
10 changed files with 35 additions and 306 deletions

View File

@@ -3,7 +3,7 @@ local Config = require('config')
local Event = require('event')
local NFT = require('nft')
local Packages = require('packages')
local SHA1 = require('sha1')
local SHA = require('crypto.sha2')
local Tween = require('ui.tween')
local UI = require('ui')
local Util = require('util')
@@ -502,7 +502,7 @@ end
function page.editor:updateApplications(app)
if not app.key then
app.key = SHA1.sha1(app.title)
app.key = SHA.compute(app.title)
end
local filename = app.filename or fs.combine(REGISTRY_DIR, app.key)
Util.writeTable(filename, app)
@@ -571,7 +571,7 @@ end
Event.on('overview_shortcut', function(_, app)
if not app.key then
app.key = SHA1.sha1(app.title)
app.key = SHA.compute(app.title)
end
local filename = app.filename or fs.combine(REGISTRY_DIR, app.key)
if not fs.exists(filename) then