 		return Array(header)
 	}
 
-	private func decryptVoiceData(_ data: Data) {
+	private func decryptVoiceData(_ data: Data) throws {
 		defer { free(unencrypted) }
 
 		let rtpHeader = Array(data.prefix(12))

		let success = crypto_secretbox_open_easy(unencrypted, voiceData, UInt64(data.count - 12), &nonce, &self.secret!)

		// Decryption failure
		guard success != -1 else { return }

		self.client?.handleVoiceData(DiscordVoiceData(rtpHeader: rtpHeader,
			voiceData: Array(UnsafeBufferPointer<UInt8>(start: unencrypted, count: audioSize))))

import Sodium

enum DiscordVoiceEngineError : Error {
	case decryptionError
	case encryptionError
	case ipExtraction
}

