Integration and unit tests for logger.go and file.go in utils

This commit is contained in:
porosnicuadrian
2020-12-04 17:54:40 +02:00
committed by Dan Christian Bogos
parent f8e636074b
commit c829c775e2
6 changed files with 744 additions and 18 deletions

View File

@@ -966,11 +966,8 @@ func AESDecrypt(encrypted string, encKey string) (txt string, err error) {
nonceSize := aesGCM.NonceSize()
nonce, ciphertext := enc[:nonceSize], enc[nonceSize:]
var plaintext []byte
if plaintext, err = aesGCM.Open(nil, nonce, ciphertext, nil); err != nil {
return
}
return fmt.Sprintf("%s", plaintext), nil
plaintext, err = aesGCM.Open(nil, nonce, ciphertext, nil)
return string(plaintext), err
}
// Hash generates the hash text