Hacker Newsnew | past | comments | ask | show | jobs | submit | nimmo's commentslogin

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


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.


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;
}]);


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: