File: libs/js/pidCrypt/javascripts/compressed/sha256_c.js

Recommend this page to a friend!
  Classes of Jason Gerfen   jQuery.pidCrypt   libs/js/pidCrypt/javascripts/compressed/sha256_c.js   Download  
File: libs/js/pidCrypt/javascripts/compressed/sha256_c.js
Role: Application script
Content type: text/plain
Description: Application script
Class: jQuery.pidCrypt
Encrypt form values using RSA and AES
Author: By
Last change: Update of libs/js/pidCrypt/javascripts/compressed/sha256_c.js
Date: 2 years ago
Size: 2,233 bytes
 

Contents

Class file image Download
if(typeof(pidCrypt)!="undefined"){pidCrypt.SHA256=function(o){var l=8;function j(p,s){var r=(p&65535)+(s&65535);var q=(p>>16)+(s>>16)+(r>>16);return(q<<16)|(r&65535)}function f(q,p){return(q>>>p)|(q<<(32-p))}function g(q,p){return(q>>>p)}function a(p,r,q){return((p&r)^((~p)&q))}function e(p,r,q){return((p&r)^(p&q)^(r&q))}function h(p){return(f(p,2)^f(p,13)^f(p,22))}function b(p){return(f(p,6)^f(p,11)^f(p,25))}function n(p){return(f(p,7)^f(p,18)^g(p,3))}function k(p){return(f(p,17)^f(p,19)^g(p,10))}function c(q,r){var D=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var s=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var p=new Array(64);var F,E,C,B,z,x,w,v,u,t;var A,y;q[r>>5]|=128<<(24-r%32);q[((r+64>>9)<<4)+15]=r;for(var u=0;u<q.length;u+=16){F=s[0];E=s[1];C=s[2];B=s[3];z=s[4];x=s[5];w=s[6];v=s[7];for(var t=0;t<64;t++){if(t<16){p[t]=q[t+u]}else{p[t]=j(j(j(k(p[t-2]),p[t-7]),n(p[t-15])),p[t-16])}A=j(j(j(j(v,b(z)),a(z,x,w)),D[t]),p[t]);y=j(h(F),e(F,E,C));v=w;w=x;x=z;z=j(B,A);B=C;C=E;E=F;F=j(A,y)}s[0]=j(F,s[0]);s[1]=j(E,s[1]);s[2]=j(C,s[2]);s[3]=j(B,s[3]);s[4]=j(z,s[4]);s[5]=j(x,s[5]);s[6]=j(w,s[6]);s[7]=j(v,s[7])}return s}function i(s){var r=Array();var p=(1<<l)-1;for(var q=0;q<s.length*l;q+=l){r[q>>5]|=(s.charCodeAt(q/l)&p)<<(24-q%32)}return r}function m(s){var q=0;var r=q?"0123456789ABCDEF":"0123456789abcdef";var t="";for(var p=0;p<s.length*4;p++){t+=r.charAt((s[p>>2]>>((3-p%4)*8+4))&15)+r.charAt((s[p>>2]>>((3-p%4)*8))&15)}return t}function d(p){return m(c(i(p),p.length*l))}return m(c(i(o),o.length*l))}};