code: def encrypt_with_ad(self, ad: bytes, plaintext: bytes) -> bytes:
          
          if self.n == MAX_NONCE:
              raise NoiseMaxNonceError('Nonce has depleted!')
  
          if not self.has_key():
              return plaintext
  
          ciphertext = self.cipher.encrypt(self.k, self.n, ad, plaintext)
          self.n = self.n + 1
          return ciphertext
docs: If k is non-empty returns ENCRYPT(k, n++, ad, plaintext). Otherwise returns plaintext.
  
          :param ad: bytes sequence
          :param plaintext: bytes sequence
          :return: ciphertext bytes sequence