Update Picocrypt.go

This commit is contained in:
Evan Su 2021-05-19 15:00:39 -04:00 committed by GitHub
parent 501ac73fe1
commit a850a96fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 2 deletions

View File

@ -61,6 +61,33 @@ var passwordToggleString = "Show"
var progress float32 = 0 var progress float32 = 0
var progressInfo = "" var progressInfo = ""
var status = "Ready." var status = "Ready."
var items = []string{
"Fast",
"Normal",
"Secure",
"Paranoid",
}
var itemSelected int32
var shredder_info = []string{
"Provides a basic level of security; safe from casual theives and hackers.\n"+
" 1. Overwrites the file once\n"+
" 2. Deletes the file\n",
"Provides a moderate level of security; safe from hackers and most police.\n"+
" 1. Overwrites the file with 4 passes\n"+
" 2. Deletes the file\n"+
" 3. Trims the drive\n",
"Provides a high level of security; safe from just about anyone.\n"+
" 1. Trims the drive\n"+
" 2. Overwrites the file with 10 passes\n"+
" 3. Deletes the file\n"+
" 4. Trims the drive again\n",
"Provides a very high level of security; safe from three-letter agencies.\n"+
" 1. Trims the drive\n"+
" 2. Defragments the drive\n"+
" 3. Overwrites the file with 35 passes\n"+
" 4. Deletes the file\n"+
" 5. Trims the drive again\n",
}
// User input variables // User input variables
var password string var password string
@ -223,7 +250,12 @@ func startUI(){
tab = 1 tab = 1
} }
}), }),
g.Dummy(30,0),
g.Label("Mode:"),
g.Dummy(10,0),
g.Combo("##shredder_mode",items[itemSelected],items,&itemSelected).Size(464),
g.Dummy(10,0),
g.Label(shredder_info[itemSelected]),
), ),
// File checksum generator tab // File checksum generator tab
@ -997,7 +1029,9 @@ func rsDecode(data []byte,encoder reedsolomon.Encoder,size int) []byte{
// Create the master window, set callbacks, and start the UI // Create the master window, set callbacks, and start the UI
func main(){ func main(){
window := g.NewMasterWindow("Picocrypt",480,500,g.MasterWindowFlagsNotResizable,nil) var width int = 480
var height int = 500
window := g.NewMasterWindow("Picocrypt",width,height,g.MasterWindowFlagsNotResizable)
window.SetDropCallback(onDrop) window.SetDropCallback(onDrop)
dpi = g.Context.GetPlatform().GetContentScale() dpi = g.Context.GetPlatform().GetContentScale()
window.Run(startUI) window.Run(startUI)