|
@ -1,7 +1,6 @@ |
|
|
package Encryption |
|
|
package Encryption |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"fmt" |
|
|
|
|
|
"bytes" |
|
|
"bytes" |
|
|
"crypto/aes" |
|
|
"crypto/aes" |
|
|
"errors" |
|
|
"errors" |
|
@ -76,7 +75,6 @@ func EditEncryptedFile(password string, FilePath string) (error) { |
|
|
// open output file
|
|
|
// open output file
|
|
|
encryptedFile, e = os.OpenFile(FilePath, os.O_RDWR, 0666) |
|
|
encryptedFile, e = os.OpenFile(FilePath, os.O_RDWR, 0666) |
|
|
if e != nil { |
|
|
if e != nil { |
|
|
fmt.Println(1) |
|
|
|
|
|
return e |
|
|
return e |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -87,7 +85,6 @@ func EditEncryptedFile(password string, FilePath string) (error) { |
|
|
|
|
|
|
|
|
_, e = io.Copy(encryptedFile, bytes.NewReader(ciphertext)) |
|
|
_, e = io.Copy(encryptedFile, bytes.NewReader(ciphertext)) |
|
|
if e != nil { |
|
|
if e != nil { |
|
|
fmt.Println(2) |
|
|
|
|
|
return e |
|
|
return e |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|