ory-am/hydra

View on GitHub
aead/xchacha20.go

Summary

Maintainability
A
1 hr
Test Coverage

Method XChaCha20Poly1305.Encrypt has 5 return statements (exceeds 4 allowed).
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
    }
Severity: Major
Found in aead/xchacha20.go - About 35 mins to fix

    Method XChaCha20Poly1305.Decrypt has 5 return statements (exceeds 4 allowed).
    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)
        }
    Severity: Major
    Found in aead/xchacha20.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status