summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCh1ffr3punk <sacenator@gmail.com>2026-03-08 08:29:27 +0100
committerGitHub <noreply@github.com>2026-03-08 08:29:27 +0100
commit1735a6ca0ee24b09d42739b345c56e55f2932352 (patch)
tree0cc72bd4d2c59287aa13d3eafa4dbccb922b03bb
parentcc31c2e642c4062ff9f4d155c4e06c2071109bfd (diff)
downloadyubicrpt-cli-1735a6ca0ee24b09d42739b345c56e55f2932352.tar.gz
yubicrpt-cli-1735a6ca0ee24b09d42739b345c56e55f2932352.tar.xz
yubicrpt-cli-1735a6ca0ee24b09d42739b345c56e55f2932352.zip
Add files via upload
-rw-r--r--yubicrypt.go6
1 files changed, 3 insertions, 3 deletions
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