Hi i am trying to decipher the signature present in youtube page.I passed the orginal signature to below function as its there in youtube html5player js(http://s.ytimg.com/yts/jsbin/html5player-en_US-vflr38Js6/html5player.js) .but this function just removes first and last two characters.Am i missing any steps please enlighten me.Thanks.
var ar = {
KF: function(a, b) {
a.splice(0, b);
},
Xm: function(a) {
a.reverse();
},
BT: function(a, b) {
var c = a[0];
a[0] = a[b % a.length];
a[b] = c;
}
};
function br(a) {
a = a.split("");
ar.BT(a, 63);
ar.KF(a, 1);
ar.Xm(a, 43);
ar.BT(a, 46);
ar.KF(a, 2);
ar.Xm(a, 0);
ar.KF(a, 3);
return a.join("")
};
console.log(br("6A51A51911872F6C22D0BD925F0AC6865F8BBB63AE24.8933FFE6E311091075A664E5B940181409139CEAE0"));
orginal :
6A51A51911872F6C22D0BD925F0AC6865F8BBB63AE24.8933FFE6E311091075A664E5B940181409139CEAE0
result :
A51911872F6C22D0BD925F0AC6865F8BBB630E24.8933FFE6E3110910756664E5B940181409139CEA
Expected result is something like below:
8C06A0DDD566FD3C3B278CFD2BFE39AFD8A0B5C3.3AFF1E5C1C378DB9751628A61FEE0130041F556F