mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-29 10:09:35 +02:00
fix typos
This commit is contained in:
committed by
fiatjaf_
parent
0f66883dc7
commit
e55f5492ab
@ -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])
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user