Earlier quoted context omitted.
Either will work for the given scenario. The only difference I see is that with client-side crypto you can't accidentally write the key into a server log file, where as with server-side crypto it is possible. But then again at some point you will add some logging to client-side code as well, so the point will be moot - you will have to sanitize logs at point of production. Another thing is that it makes much better m…
OK, then: 1. Given that either will work for this scenario; and 2. Given that JavaScript has every weakness that the other method has; and 3. Given that JavaScript also has weaknesses that the other method does not have; then Why would you use JavaScript to solve this problem?
As far security is concerned, the two are equally (in)secure. And client-side crypto still has the advantage that key management is much easier to explain to the user, thus the app is more likely to be used.