                             nonce.withUnsafeBytes { noncePtr in
                                 secretKey.withUnsafeBytes { secretKeyPtr in
                                     crypto_aead_xchacha20poly1305_ietf_encrypt(
-                                        UnsafeMutablePointer<UInt8>(authenticatedCipherTextPtr),
-                                        UnsafeMutablePointer<UInt64>(authenticatedCipherTextLenPtr),
-                                        
-                                        UnsafePointer<UInt8>(messagePtr),
+                                        authenticatedCipherTextPtr,
+                                        authenticatedCipherTextLenPtr,
+                                        
+                                        messagePtr,
                                         UInt64(message.count),
                                         
                                         nil,

                                nonce.withUnsafeBytes { noncePtr in
                                    secretKey.withUnsafeBytes { secretKeyPtr in
                                        crypto_aead_xchacha20poly1305_ietf_decrypt(
                                            UnsafeMutablePointer<UInt8>(messagePtr),
                                            UnsafeMutablePointer<UInt64>(messageLen),
                                            
                                            nil,
                                            
                                            UnsafePointer<UInt8>(cipherTextPtr),
                                            UInt64(authenticatedCipherText.count),
                                            
                                            UnsafePointer<UInt8>(additionalDataPtr),
                                            UInt64(additionalData.count),
                                            
                                            noncePtr, secretKeyPtr

                            nonce.withUnsafeBytes { noncePtr in
                                secretKey.withUnsafeBytes { secretKeyPtr in
                                    crypto_aead_xchacha20poly1305_ietf_decrypt(
                                        messagePtr,
                                        messageLen,
                                        
                                        nil,
                                        
                                        cipherTextPtr,
                                        UInt64(authenticatedCipherText.count),
                                        
                                        nil,
