Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
DTLP committed Sep 22, 2023
1 parent 5bb79a0 commit c7cfe62
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 764 deletions.
Binary file added bin/strongbox-test
Binary file not shown.
9 changes: 9 additions & 0 deletions cmd/strongbox-test/files/file1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# STRONGBOX ENCRYPTED RESOURCE ; See https://github.com/uw-labs/strongbox
blWUTVRh4zO8PZ5AQw8OETzLfoaonYaow0YHjwa4OP27oaN3D7sGQYZEOjEdu44K++UTKophWmqj
ccHBI9r5IoKk7WlfvvCoYYUtMi8KVMRghcz8putXvfnlAo1jCsqfOIuBtNBRLOjfF7cTwEjhSXG9
vCdQgkxnDRG1jisK+pGmiobnzQAfBENohesEEdRsS9dueWjH2Zp3zHotA8iq9XUA9auR7rFJ4cFk
rKqkPzeGBd/UP9zG1ZKFAISF6M6Lj5JvRze8pB+LsMAZYPNfx30mXHffgQDmAsEGkx99B+nSSJ6G
LOB+jY8a2Ny0e8qLNCub5gdac33oN8qzHnldcNTffuQWOA6pdWDo3Cg7C4L67updvQvx7zy9zg4f
W1TZNxHkYwoq3QRz9RmjYulCuLD+V/EV4EsoekurxQ9Aq8s7wRcbH4dsHcIuDaHpNQobOOTI+bI4
424BtL7K667v1L67M49FDObv16ZpSbmcg5VT+Yj97JpMWIa6oQsrV+aURn+FG5YhHkD25FyVz7KZ
W/460r9t1TQ=
9 changes: 9 additions & 0 deletions cmd/strongbox-test/files/file2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# STRONGBOX ENCRYPTED RESOURCE ; See https://github.com/uw-labs/strongbox
blWUTVRh4zO8PZ5AQw8OETzLfoaonYaow0YHjwa4OP27oaN3D7sGQYZEOjEdu44K++UTKophWmqj
ccHBI9r5IoKk7WlfvvCoYYUtMi8KVMRghcz8putXvfnlAo1jCsqfOIuBtNBRLOjfF7cTwEjhSXG9
vCdQgkxnDRG1jisK+pGmiobnzQAfBENohesEEdRsS9dueWjH2Zp3zHotA8iq9XUA9auR7rFJ4cFk
rKqkPzeGBd/UP9zG1ZKFAISF6M6Lj5JvRze8pB+LsMAZYPNfx30mXHffgQDmAsEGkx99B+nSSJ6G
LOB+jY8a2Ny0e8qLNCub5gdac33oN8qzHnldcNTffuQWOA6pdWDo3Cg7C4L67updvQvx7zy9zg4f
W1TZNxHkYwoq3QRz9RmjYulCuLD+V/EV4EsoekurxQ9Aq8s7wRcbH4dsHcIuDaHpNQobOOTI+bI4
424BtL7K667v1L67M49FDObv16ZpSbmcg5VT+Yj97JpMWIa6oQsrV+aURn+FG5YhHkD25FyVz7KZ
W/460r9t1TQ=
35 changes: 35 additions & 0 deletions cmd/strongbox-test/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package main

import (
"log"
"os"

"github.com/uw-labs/strongbox/strongbox"
)


var (
path = "/Users/dmitrijslapo/uw/strongbox/strongbox-test/files/"
keyPath = "/Users/dmitrijslapo/uw/strongbox/strongbox-test/test-key"
)

func main() {
key, err := os.ReadFile(keyPath)
if err != nil {
log.Printf("Error reading file: %v\n", err)
return
}

keyBytes := []byte(key) // Convert key string into byte slice

// Decode the key
dk, err := strongbox.Decode([]byte(keyBytes))
if err != nil {
log.Fatalf("Unable to decode given private key %v", err)
}

// Decrypt file(s) at the path provided
if err := strongbox.RecursiveDecrypt(path, dk); err != nil {
log.Fatalln(err)
}
}
Binary file added cmd/strongbox-test/strongbox-test
Binary file not shown.
1 change: 1 addition & 0 deletions cmd/strongbox-test/test-key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RVsJd8mt7rl1s3EpMCr4ACwRpaSWyMJIRg4qlQpSJeI=
140 changes: 0 additions & 140 deletions cmd/strongbox/strongbox.go

This file was deleted.

2 changes: 1 addition & 1 deletion integration_tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine
FROM golang:1.21-alpine

RUN apk --no-cache add git

Expand Down
84 changes: 0 additions & 84 deletions internal/strongbox/keyring.go

This file was deleted.

Loading

0 comments on commit c7cfe62

Please sign in to comment.