mirror of
https://github.com/HACKERALERT/Picocrypt.git
synced 2024-12-29 19:02:43 +00:00
Update & Optimize
This commit is contained in:
parent
d427f75bad
commit
d1aa6ea52f
3 changed files with 18 additions and 33 deletions
|
@ -25,7 +25,6 @@ import (
|
|||
"hash"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"io"
|
||||
"math"
|
||||
"math/big"
|
||||
|
@ -50,12 +49,6 @@ import (
|
|||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
//go:embed icon.png
|
||||
var icon []byte
|
||||
|
||||
//go:embed font.ttf
|
||||
var font []byte
|
||||
|
||||
// Generic variables
|
||||
var version = "v1.23"
|
||||
var window *giu.MasterWindow
|
||||
|
@ -1673,18 +1666,10 @@ func humanize(seconds int) string {
|
|||
}
|
||||
|
||||
func main() {
|
||||
// Set a universal font
|
||||
giu.SetDefaultFontFromBytes(font, 18)
|
||||
|
||||
// Create the master window
|
||||
window = giu.NewMasterWindow("Picocrypt", 442, 452, giu.MasterWindowFlagsNotResizable)
|
||||
dialog.Init()
|
||||
|
||||
// Set window icon
|
||||
reader := bytes.NewReader(icon)
|
||||
decoded, _ := png.Decode(reader)
|
||||
window.SetIcon([]image.Image{decoded})
|
||||
|
||||
// Set callbacks
|
||||
window.SetDropCallback(onDrop)
|
||||
window.SetCloseCallback(func() bool {
|
||||
|
|
12
src/go.mod
12
src/go.mod
|
@ -5,18 +5,18 @@ go 1.17
|
|||
require (
|
||||
github.com/HACKERALERT/clipboard v0.1.5-0.20211215214929-7345ba96aeca
|
||||
github.com/HACKERALERT/dialog v0.0.0-20211215220206-17f428aa513e
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220103032438-67fac8c5b49e
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220319144313-d262b7f46c4f
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220327031954-f16932ec1d06
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220327020438-3073de4d0e0a
|
||||
github.com/HACKERALERT/serpent v0.0.0-20210716182301-293b29869c66
|
||||
github.com/HACKERALERT/zxcvbn-go v0.0.0-20210927200100-f131a4666ad5
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
|
||||
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/HACKERALERT/gl v0.0.0-20211216002416-e8bf2db61361 // indirect
|
||||
github.com/HACKERALERT/gl v0.0.0-20220327023711-7f5daacfd4ff // indirect
|
||||
github.com/HACKERALERT/glfw/v3.3/glfw v0.0.0-20211216001154-d0da149b3bef // indirect
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220103031756-be35cb948814 // indirect
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220327031353-706c73407fa1 // indirect
|
||||
github.com/HACKERALERT/mainthread v0.0.0-20211027212305-2ec9e701cc14 // indirect
|
||||
github.com/HACKERALERT/w32 v0.0.0-20211215215707-4b84c2675d8d // indirect
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
|
||||
golang.org/x/sys v0.0.0-20220325203850-36772127a21f // indirect
|
||||
)
|
||||
|
|
24
src/go.sum
24
src/go.sum
|
@ -2,16 +2,16 @@ github.com/HACKERALERT/clipboard v0.1.5-0.20211215214929-7345ba96aeca h1:yZj12M2
|
|||
github.com/HACKERALERT/clipboard v0.1.5-0.20211215214929-7345ba96aeca/go.mod h1:kkjR9AGvIlIUJdjd/CBL1VfQvyPDE5kL31rAzY/r0s4=
|
||||
github.com/HACKERALERT/dialog v0.0.0-20211215220206-17f428aa513e h1:3tBZg/OOLNsQrSf5gZc8y3fXiHVxl+kg/iTs0maa0BA=
|
||||
github.com/HACKERALERT/dialog v0.0.0-20211215220206-17f428aa513e/go.mod h1:GxPIEf2nKp6Gx+sdpjwTdFIGmW5kj6Jta7rRO50TgpU=
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220103032438-67fac8c5b49e h1:Tgi2OK7D2ebToM6pFOYaWdUrup8nDJ6ZrOy1Q3g75B8=
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220103032438-67fac8c5b49e/go.mod h1:ylqoTOVshsPHJIvj0/YFouHwRy/8wLaJF7x21fiDrzE=
|
||||
github.com/HACKERALERT/gl v0.0.0-20211216002416-e8bf2db61361 h1:NMPzcOu/LpfEUf0wRZlayjlU0345ujYOWZbVKsfL6g4=
|
||||
github.com/HACKERALERT/gl v0.0.0-20211216002416-e8bf2db61361/go.mod h1:ZUosVzfEKNGLMLk6aj9yo0FSAhWWsbTMjuzeIUXniB0=
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220327031954-f16932ec1d06 h1:rsYytZb109xvaFJbtdFQZoXYVExly/xLLAiNtrDM7oc=
|
||||
github.com/HACKERALERT/giu v0.5.7-0.20220327031954-f16932ec1d06/go.mod h1:HfkmTAHP8NrXtJPdAge+QBBKAxCU1B5imPKMzHxce/k=
|
||||
github.com/HACKERALERT/gl v0.0.0-20220327023711-7f5daacfd4ff h1:ayq8RpyjGJkuhwymTUAMNdDRl5SYp/R7EgR5tE5GkAs=
|
||||
github.com/HACKERALERT/gl v0.0.0-20220327023711-7f5daacfd4ff/go.mod h1:ZUosVzfEKNGLMLk6aj9yo0FSAhWWsbTMjuzeIUXniB0=
|
||||
github.com/HACKERALERT/glfw/v3.3/glfw v0.0.0-20211216001154-d0da149b3bef h1:MWA48bM0uKSblAiB51YtMDWEBhJtX+s3HcjlUN7o8cE=
|
||||
github.com/HACKERALERT/glfw/v3.3/glfw v0.0.0-20211216001154-d0da149b3bef/go.mod h1:aP+FSN9tk1W3UsQisFWxRLQ4WOF7T3niq68UYw0B150=
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220103031756-be35cb948814 h1:j/mK+j+UOFkB3j4WVYG0ghuADyFYAv5STW+1wqyrqE4=
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220103031756-be35cb948814/go.mod h1:Yo2L7QsU7d+Y6+Uput8+3AHYji0EFojRg4Sokun4Xb0=
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220319144313-d262b7f46c4f h1:QSBkZZSXymDu/2H1gktGAVj7gXf7UxvUmCLH+XCkCkg=
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220319144313-d262b7f46c4f/go.mod h1:2230MD7WX1dzDUvI2ufu+NSqV+zxedG0M6ae84EuHng=
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220327031353-706c73407fa1 h1:WvOnBTqCdmfndxLJMKvIBjvSCUGTgWldH9yA8OHEzD8=
|
||||
github.com/HACKERALERT/imgui-go v1.12.1-0.20220327031353-706c73407fa1/go.mod h1:6m8kRKkqQ60KM0dF3Ehf5q6cKsDDq+/td7SXKR8lVxY=
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220327020438-3073de4d0e0a h1:Gqs+wdmHzVsT5HxrMfwNAWoDOnDQVlk/fNxtpsaQ+nw=
|
||||
github.com/HACKERALERT/infectious v0.0.0-20220327020438-3073de4d0e0a/go.mod h1:xSuPEzKPGzUiAo1hlTjz/3e4iAjPzwGFGN7wyhy3CV8=
|
||||
github.com/HACKERALERT/mainthread v0.0.0-20211027212305-2ec9e701cc14 h1:DwWXverhu/dEsPM/GPykuHGh4SxW69DaGZL5t3fANG4=
|
||||
github.com/HACKERALERT/mainthread v0.0.0-20211027212305-2ec9e701cc14/go.mod h1:jW534e7roGur9mmzAfPxZLQzKXZ+GE5+XeS7PSyqPbo=
|
||||
github.com/HACKERALERT/serpent v0.0.0-20210716182301-293b29869c66 h1:YDpFq+y6mRcu97rn/rhYg8u8FdeO0wzTuLgM2gVkA+c=
|
||||
|
@ -20,14 +20,14 @@ github.com/HACKERALERT/w32 v0.0.0-20211215215707-4b84c2675d8d h1:Ey0tgsr4MbX64pk
|
|||
github.com/HACKERALERT/w32 v0.0.0-20211215215707-4b84c2675d8d/go.mod h1:S+3Ad2AEm5MhhuHJeAaXUmyAXON0qFDxcP/Chw8q7+Y=
|
||||
github.com/HACKERALERT/zxcvbn-go v0.0.0-20210927200100-f131a4666ad5 h1:cIW3wwoeZ6zru8VhdoGlZAinG+6ObzHx7BgQxUfhF34=
|
||||
github.com/HACKERALERT/zxcvbn-go v0.0.0-20210927200100-f131a4666ad5/go.mod h1:nykydiYjCDMkF/2vQXSPM38vR5N9W1DITHvupnN+eOk=
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
|
||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s=
|
||||
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220325203850-36772127a21f h1:TrmogKRsSOxRMJbLYGrB4SBbW+LJcEllYBLME5Zk5pU=
|
||||
golang.org/x/sys v0.0.0-20220325203850-36772127a21f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
|
Loading…
Reference in a new issue