aead/xchacha20.go
Method XChaCha20Poly1305.Encrypt
has 5 return statements (exceeds 4 allowed). Open
Open
func (x *XChaCha20Poly1305) Encrypt(ctx context.Context, plaintext, additionalData []byte) (string, error) {
key, err := encryptionKey(ctx, x.d, chacha20poly1305.KeySize)
if err != nil {
return "", err
}
Method XChaCha20Poly1305.Decrypt
has 5 return statements (exceeds 4 allowed). Open
Open
func (x *XChaCha20Poly1305) Decrypt(ctx context.Context, ciphertext string, aad []byte) (plaintext []byte, err error) {
msg, err := base64.URLEncoding.DecodeString(ciphertext)
if err != nil {
return nil, errorsx.WithStack(err)
}