4 ms·
It is a right link. Pls search 'NSA' and you will find the algorithm.
by nimmo 11y ago
It is a right link. Pls search 'NSA' and you will find the algorithm.
- ColinWright 11y agoSo, 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 11y agoApologies. 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; }]);