fix typos

This commit is contained in:
Yasuhiro Matsumoto
2023-09-11 23:23:46 +09:00
committed by fiatjaf_
parent 0f66883dc7
commit e55f5492ab
3 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ func Encrypt(message string, key []byte) (string, error) {
func Decrypt(content string, key []byte) (string, error) {
parts := strings.Split(content, "?iv=")
if len(parts) < 2 {
return "", fmt.Errorf("error parsing encrypted message: no initilization vector")
return "", fmt.Errorf("error parsing encrypted message: no initialization vector")
}
ciphertext, err := base64.StdEncoding.DecodeString(parts[0])

View File

@ -7,7 +7,7 @@ import (
func TestEncryptionAndDecryption(t *testing.T) {
sharedSecret := make([]byte, 32)
message := "hello hellow"
message := "hello hello"
ciphertext, err := Encrypt(message, sharedSecret)
if err != nil {