Run go fmt
This commit is contained in:
parent
c4a66bc30d
commit
ed1df49af5
@ -3,10 +3,10 @@ package cryptfs
|
||||
// File content encryption / decryption
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"bytes"
|
||||
"crypto/cipher"
|
||||
"crypto/md5"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"os"
|
||||
@ -197,7 +197,7 @@ func (be *CryptFS) CropPlaintext(plaintext []byte, blocks []intraBlock) []byte {
|
||||
length := (last.BlockNo - blocks[0].BlockNo + 1) * be.plainBS
|
||||
var cropped []byte
|
||||
if offset+length > uint64(len(plaintext)) {
|
||||
cropped = plaintext[offset:len(plaintext)]
|
||||
cropped = plaintext[offset:]
|
||||
} else {
|
||||
cropped = plaintext[offset : offset+length]
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package cryptfs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Get "n" random bytes from /dev/urandom or panic
|
||||
|
@ -1,14 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"fmt"
|
||||
"encoding/hex"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/rfjakob/gocryptfs/cryptfs"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
// printMasterKey - remind the user that he should store the master key in
|
||||
// a safe place
|
||||
func printMasterKey(key []byte) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// cmdline looks like this: /bin/bash \0 /path/to/gocryptfs \0 --zerokey \0 ...
|
||||
|
@ -6,14 +6,14 @@ package benchmark
|
||||
// go test -bench=.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"github.com/spacemonkeygo/openssl"
|
||||
"testing"
|
||||
"fmt"
|
||||
"github.com/rfjakob/gocryptfs/cryptfs"
|
||||
"github.com/spacemonkeygo/openssl"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
Loading…
Reference in New Issue
Block a user