mirror of
https://github.com/Picocrypt/CLI.git
synced 2026-03-11 14:44:23 +00:00
Compare commits
No commits in common. "main" and "2.08" have entirely different histories.
6 changed files with 37 additions and 48 deletions
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.24'
|
||||
go-version: '>1.18'
|
||||
check-latest: true
|
||||
cache: false
|
||||
|
||||
|
|
@ -31,12 +31,16 @@ jobs:
|
|||
- name: Build
|
||||
run: |
|
||||
cd picocrypt
|
||||
GOOS=windows GOARCH=386 go build -v -ldflags="-s -w" -o picocrypt-windows-386.exe .
|
||||
GOOS=windows GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-windows-amd64.exe .
|
||||
GOOS=windows GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-windows-arm64.exe .
|
||||
GOOS=darwin GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-macos-amd64 .
|
||||
GOOS=darwin GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-macos-arm64 .
|
||||
GOOS=linux GOARCH=386 go build -v -ldflags="-s -w" -o picocrypt-linux-386 .
|
||||
GOOS=linux GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-linux-amd64 .
|
||||
GOOS=linux GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-linux-arm64 .
|
||||
GOOS=linux GOARCH=riscv64 go build -v -ldflags="-s -w" -o picocrypt-linux-riscv64 .
|
||||
GOOS=wasip1 GOARCH=wasm go build -v -ldflags="-s -w" -o picocrypt-wasip1.wasm .
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
|
||||
|
|
@ -49,11 +53,15 @@ jobs:
|
|||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
picocrypt/picocrypt-windows-386.exe
|
||||
picocrypt/picocrypt-windows-amd64.exe
|
||||
picocrypt/picocrypt-windows-arm64.exe
|
||||
picocrypt/picocrypt-macos-amd64
|
||||
picocrypt/picocrypt-macos-arm64
|
||||
picocrypt/picocrypt-linux-386
|
||||
picocrypt/picocrypt-linux-amd64
|
||||
picocrypt/picocrypt-linux-arm64
|
||||
picocrypt/picocrypt-linux-riscv64
|
||||
picocrypt/picocrypt-wasip1.wasm
|
||||
tag_name: ${{ env.VERSION }}
|
||||
make_latest: true
|
||||
|
|
|
|||
|
|
@ -34,6 +34,3 @@ To decrypt a volume:
|
|||
```
|
||||
picocrypt volume.pcv
|
||||
```
|
||||
|
||||
## Issues
|
||||
Report any issues to the main Picocrypt/Picocrypt repository and prefix the title with 'CLI:'.
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1.49
|
||||
2.08
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
module github.com/Picocrypt/CLI/picocrypt
|
||||
|
||||
go 1.24.0
|
||||
|
||||
toolchain go1.24.1
|
||||
go 1.22.3
|
||||
|
||||
require (
|
||||
github.com/Picocrypt/infectious v0.0.0-20250412183341-9f88c6307b39
|
||||
github.com/Picocrypt/infectious v0.0.0-20240830233326-3a050f65f9ec
|
||||
github.com/Picocrypt/serpent v0.0.0-20240830233833-9ad6ab254fd7
|
||||
github.com/schollz/progressbar/v3 v3.18.0
|
||||
golang.org/x/crypto v0.40.0
|
||||
golang.org/x/term v0.33.0
|
||||
github.com/schollz/progressbar/v3 v3.14.6
|
||||
golang.org/x/crypto v0.27.0
|
||||
golang.org/x/term v0.24.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
golang.org/x/sys v0.34.0 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,28 +1,29 @@
|
|||
github.com/Picocrypt/infectious v0.0.0-20250412183341-9f88c6307b39 h1:czHyPoiNrILv9xjfQ87UFllJgak8W6gVcYkmfOay/BE=
|
||||
github.com/Picocrypt/infectious v0.0.0-20250412183341-9f88c6307b39/go.mod h1:2ZVEanURxuWmxYZ6W6xMMy4ZR6xmQr16Vq/XPTLIspQ=
|
||||
github.com/Picocrypt/infectious v0.0.0-20240830233326-3a050f65f9ec h1:/cop0/v0HxIJm1XGDgIlzNJ3e4HhM8nIUPZi5RZ/n1w=
|
||||
github.com/Picocrypt/infectious v0.0.0-20240830233326-3a050f65f9ec/go.mod h1:aaFq/WMVxrU2Exl/tXbTFSXajZrqw0mgn/wi42n0fK4=
|
||||
github.com/Picocrypt/serpent v0.0.0-20240830233833-9ad6ab254fd7 h1:G36G2vmQAS7CVoHQrHDGAoCWll/0kPCI8Dk7mgwcJFE=
|
||||
github.com/Picocrypt/serpent v0.0.0-20240830233833-9ad6ab254fd7/go.mod h1:BxsgRYwUVd92aEwXnXsfXfHw8aHlD/PUyExC/wwk9oI=
|
||||
github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM=
|
||||
github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
||||
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=
|
||||
github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
|
||||
golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
github.com/schollz/progressbar/v3 v3.14.6 h1:GyjwcWBAf+GFDMLziwerKvpuS7ZF+mNTAXIB2aspiZs=
|
||||
github.com/schollz/progressbar/v3 v3.14.6/go.mod h1:Nrzpuw3Nl0srLY0VlTvC4V6RL50pcEymjy6qyJAaLa0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
|
||||
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
|
||||
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
|
||||
golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM=
|
||||
golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8=
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import (
|
|||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
|
@ -185,7 +184,7 @@ func compress() int {
|
|||
return 1
|
||||
}
|
||||
dir = filepath.ToSlash(dir)
|
||||
file, err = os.CreateTemp("", "picocrypt-cli-v2-*.zip.tmp")
|
||||
file, err = os.CreateTemp("", "picocrypt-cli-v2-*.tmp")
|
||||
if err != nil {
|
||||
fmt.Println("Cannot create temporary file!")
|
||||
return 1
|
||||
|
|
@ -193,8 +192,6 @@ func compress() int {
|
|||
pzip = file.Name()
|
||||
writer = zip.NewWriter(file)
|
||||
|
||||
fmt.Println("Info: creating temporary zip file " + pzip)
|
||||
|
||||
for i, path := range files {
|
||||
stat, err := os.Stat(path)
|
||||
if err != nil {
|
||||
|
|
@ -245,7 +242,6 @@ func compress() int {
|
|||
return 1
|
||||
}
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
}
|
||||
writer.Close()
|
||||
file.Close()
|
||||
|
|
@ -346,7 +342,7 @@ func work() int {
|
|||
hkdfSalt = make([]byte, 32)
|
||||
serpentIV = make([]byte, 16)
|
||||
nonce = make([]byte, 24)
|
||||
_, errs[0] = fout.Write(rsEncode(rs5, []byte("v1.48")))
|
||||
_, errs[0] = fout.Write(rsEncode(rs5, []byte("v1.34")))
|
||||
_, errs[1] = fout.Write(rsEncode(rs5, []byte("00000")))
|
||||
flags := make([]byte, 5)
|
||||
if *p {
|
||||
|
|
@ -443,7 +439,6 @@ func work() int {
|
|||
} else {
|
||||
key = argon2.IDKey(password, salt, 4, 1<<20, 4, 32)
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
tmp := sha3.New512()
|
||||
tmp.Write(key)
|
||||
keyHash = tmp.Sum(nil)
|
||||
|
|
@ -598,7 +593,6 @@ func work() int {
|
|||
serpent = cipher.NewCTR(s, serpentIV)
|
||||
counter = 0
|
||||
}
|
||||
debug.FreeOSMemory()
|
||||
}
|
||||
|
||||
if mode == "encrypt" {
|
||||
|
|
@ -687,13 +681,4 @@ func main() {
|
|||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
td := os.TempDir()
|
||||
matches, err := filepath.Glob(filepath.Join(td, "picocrypt-cli-v2-*.zip.tmp"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range matches {
|
||||
os.Remove(v)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue