def encrypt_audio(header, buf)
      raise 'No secret key found, despite encryption being enabled!' unless @secret_key

      box = RbNaCl::SecretBox.new(@secret_key)

      # The nonce is the header of the voice packet with 12 null bytes appended
      nonce = header + ([0] * 12).pack('C*')

      box.encrypt(nonce, buf)
    end
def encrypt_audio(header, buf)
      raise 'No secret key found, despite encryption being enabled!' unless @secret_key

      box = RbNaCl::SecretBox.new(@secret_key)

      # The nonce is the header of the voice packet with 12 null bytes appended
      nonce = header + ([0] * 12).pack('C*')

      box.encrypt(nonce, buf)
    end
Encrypts audio data using RbNaCl
 @param header [String] The header of the packet, to be used as the nonce
 @param buf [String] The encoded audio data to be encrypted
 @return [String] the audio data, encrypted