diff options
author | Jakob Unterwurzacher | 2015-11-01 12:11:36 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-01 12:11:36 +0100 |
commit | 902babdf22199d73171716e643f1ffbb65e6fb48 (patch) | |
tree | c3194bce9fd9b4db0a569fca3b5041abd278be70 /cryptfs/file_header.go | |
parent | 14276c96328a1a1ad2b354c65d8db7fa720559e1 (diff) |
Refactor ciphertext <-> plaintext offset translation functions
Move all the intelligence into the new file address_translation.go.
That the calculations were spread out too much became apparent when adding
the file header. This should make the code much easier to modify in the
future.
Diffstat (limited to 'cryptfs/file_header.go')
-rw-r--r-- | cryptfs/file_header.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cryptfs/file_header.go b/cryptfs/file_header.go index 3fd7266..e16cbab 100644 --- a/cryptfs/file_header.go +++ b/cryptfs/file_header.go @@ -10,15 +10,15 @@ import ( ) const ( - HEADER_CURRENT_VERSION = 1 // Current on-disk-format version - HEADER_VERSION_LEN = 2 // uint16 - HEADER_ID_LEN = 16 // 128 bit random file id - HEADER_LEN = HEADER_VERSION_LEN + HEADER_ID_LEN // Total header length + HEADER_CURRENT_VERSION = 1 // Current on-disk-format version + HEADER_VERSION_LEN = 2 // uint16 + HEADER_ID_LEN = 16 // 128 bit random file id + HEADER_LEN = HEADER_VERSION_LEN + HEADER_ID_LEN // Total header length ) type FileHeader struct { Version uint16 - Id []byte + Id []byte } // Pack - serialize fileHeader object |