Skip to content

Commit

Permalink
docs: update some comments based on feedback (#111)
Browse files Browse the repository at this point in the history
References:
- https://github.com/yitsushi/totp-cli/pull/104/files#r1465363650

Signed-off-by: Victoria Nadasdi <victoria@efertone.me>
  • Loading branch information
yitsushi authored Jan 28, 2024
1 parent 93aa058 commit 5067ad0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ type Storage struct {
Namespaces []*Namespace
}

// DecryptV1 tries to decrypt the original insecure SHA1 storage.
// DecryptV1 tries to decrypt the storage with AES encryption using the SHA1
// hash of the password as encryption key.
func (s *Storage) DecryptV1() error {
encryptedData, err := os.ReadFile(s.File)
if err != nil {
Expand Down Expand Up @@ -74,7 +75,8 @@ func (s *Storage) DecryptV1() error {
return s.parse(decodedData)
}

// DecryptV2 tries to decrypt the newer age storage.
// DecryptV2 tries to decrypt the storage with "age" encryption using the
// password as it is as password.
func (s *Storage) DecryptV2() error {
rawFile, err := os.Open(s.File)
if err != nil {
Expand Down

0 comments on commit 5067ad0

Please sign in to comment.