
NSA-proof encryption algorithm in AngularJs - nimmo
https://docs.angularjs.org/guide/providers
======
ColinWright
Wrong link?

~~~
nimmo
It is a right link. Pls search 'NSA' and you will find the algorithm.

~~~
ColinWright
So, I'm on a phone, and I click the link here to be taken to something that
looks nothing like what you claim. I'm supposed, on my limited input device,
to figure out that I need to search for NSA?

That's not obvious.

~~~
nimmo
Apologies. Never thought about visiting the link from mobile.

Here is the algorithm that i copied from angularjs website as it is:

    
    
       myApp.factory('apiToken', ['clientId', function apiTokenFactory(clientId) {
      var encrypt = function(data1, data2) {
        // NSA-proof encryption algorithm:
        return (data1 + ':' + data2).toUpperCase();
      };
    
      var secret = window.localStorage.getItem('myApp.secret');
      var apiToken = encrypt(clientId, secret);
    
      return apiToken;

}]);

