From 1735a6ca0ee24b09d42739b345c56e55f2932352 Mon Sep 17 00:00:00 2001 From: Ch1ffr3punk Date: Sun, 8 Mar 2026 08:29:27 +0100 Subject: Add files via upload --- yubicrypt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yubicrypt.go') diff --git a/yubicrypt.go b/yubicrypt.go index a110d99..26a0954 100644 --- a/yubicrypt.go +++ b/yubicrypt.go @@ -107,7 +107,7 @@ func main() { encryptionUsed: false, } gui.window = gui.app.NewWindow("yubicrypt") - gui.window.Resize(fyne.NewSize(800, 600)) + gui.window.Resize(fyne.NewSize(600, 600)) gui.createUI() gui.applyTheme() gui.window.SetContent(gui.createMainUI()) @@ -888,7 +888,7 @@ func formatByteSize(bytes int) string { // securePadMessage adds ISO/IEC 7816-4 padding to align data to 1024-byte blocks func securePadMessage(data []byte) []byte { - const blockSize = 1024 // Changed from 4096 to 1024 + const blockSize = 4096 paddingNeeded := blockSize - (len(data) % blockSize) if paddingNeeded == blockSize { return data @@ -904,7 +904,7 @@ func secureUnpadMessage(data []byte) ([]byte, error) { if len(data) == 0 { return nil, errors.New("cannot unpad empty data") } - if len(data)%1024 != 0 { // Changed from 4096 to 1024 + if len(data)%4096 != 0 { return nil, errors.New("invalid block size for unpadding") } lastIndex := -1 -- cgit v1.2.3