summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-24 19:18:13 +0200
committerJakob Unterwurzacher2016-10-24 19:18:13 +0200
commitaeda9721d0150b9b77d9522bb3b4fcd17f2cbbfa (patch)
tree1cded9f7087c0d6d3d8d29fe9a1c5f0ceb3783bc /internal
parentab4de4cbcd235bf1b3466a2a5bfa4d07f0537756 (diff)
Fix misspellings
Close https://github.com/rfjakob/gocryptfs/issues/54
Diffstat (limited to 'internal')
-rw-r--r--internal/cryptocore/cryptocore_test.go2
-rw-r--r--internal/fusefrontend/file.go2
-rw-r--r--internal/fusefrontend/file_allocate_truncate.go2
-rw-r--r--internal/fusefrontend_reverse/rpath.go2
-rw-r--r--internal/nametransform/diriv.go2
5 files changed, 5 insertions, 5 deletions
diff --git a/internal/cryptocore/cryptocore_test.go b/internal/cryptocore/cryptocore_test.go
index 9da6059..c54eac9 100644
--- a/internal/cryptocore/cryptocore_test.go
+++ b/internal/cryptocore/cryptocore_test.go
@@ -16,7 +16,7 @@ func TestCryptoCoreNew(t *testing.T) {
if c.IVLen != 12 {
t.Fail()
}
- // "New(key, BackendGoGCM, 128)" is tested for Go 1.4 and 1.5+ seperately
+ // "New(key, BackendGoGCM, 128)" is tested for Go 1.4 and 1.5+ separately
}
// "New" should panic on any key not 32 bytes long
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index e021962..35c898d 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -212,7 +212,7 @@ func (f *file) Read(buf []byte, off int64) (resultData fuse.ReadResult, code fus
// doWrite - encrypt "data" and write it to plaintext offset "off"
//
// Arguments do not have to be block-aligned, read-modify-write is
-// performed internally as neccessary
+// performed internally as necessary
//
// Called by Write() for normal writing,
// and by Truncate() to rewrite the last file block.
diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go
index 650e1db..bedbba3 100644
--- a/internal/fusefrontend/file_allocate_truncate.go
+++ b/internal/fusefrontend/file_allocate_truncate.go
@@ -175,7 +175,7 @@ func (f *file) statPlainSize() (uint64, error) {
}
// truncateGrowFile extends a file using seeking or ftruncate performing RMW on
-// the first and last block as neccessary. New blocks in the middle become
+// the first and last block as necessary. New blocks in the middle become
// file holes unless they have been fallocate()'d beforehand.
func (f *file) truncateGrowFile(oldPlainSz uint64, newPlainSz uint64) fuse.Status {
if newPlainSz <= oldPlainSz {
diff --git a/internal/fusefrontend_reverse/rpath.go b/internal/fusefrontend_reverse/rpath.go
index 5288dcd..c8df8fe 100644
--- a/internal/fusefrontend_reverse/rpath.go
+++ b/internal/fusefrontend_reverse/rpath.go
@@ -30,7 +30,7 @@ const (
// derivePathIV derives an IV from an encrypted path by hashing it with sha256
func derivePathIV(path string, purpose ivPurposeType) []byte {
- // Use null byte as separator as it cannot occour in the path
+ // Use null byte as separator as it cannot occur in the path
extended := []byte(path + "\000" + string(purpose))
hash := sha256.Sum256(extended)
return hash[:nametransform.DirIVLen]
diff --git a/internal/nametransform/diriv.go b/internal/nametransform/diriv.go
index 0cc8dd3..30d4b87 100644
--- a/internal/nametransform/diriv.go
+++ b/internal/nametransform/diriv.go
@@ -49,7 +49,7 @@ func ReadDirIVAt(dirfd *os.File) (iv []byte, err error) {
// fdReadDirIV reads and verifies the DirIV from an opened gocryptfs.diriv file.
func fdReadDirIV(fd *os.File) (iv []byte, err error) {
// We want to detect if the file is bigger than DirIVLen, so
- // make the buffer 1 byte bigger than neccessary.
+ // make the buffer 1 byte bigger than necessary.
iv = make([]byte, DirIVLen+1)
n, err := fd.Read(iv)
if err != nil {