dojox/encoding/digests/_base.js

  • Provides:

    • dojox.encoding.digests._base
  • dojox.encoding.digests.outputTypes

    • type
      Object
    • summary
      Enumeration for input and output encodings.
  • dojox.encoding.digests.addWords

    • type
      Function
    • parameters:
      • a: (typeof word)
      • b: (typeof word)
    • source: [view]
        var l=(a&0xFFFF)+(b&0xFFFF);
        var m=(a>>16)+(b>>16)+(l>>16);
        return (m<<16)|(l&0xFFFF); // word
    • summary
      add a pair of words together with rollover
    • returns
      word
  • dojox.encoding.digests.stringToWord

    • type
      Function
    • parameters:
      • s: (typeof string)
    • source: [view]
        var wa=[];
        for(var i=0, l=s.length*chrsz; i   wa[i>>5]|=(s.charCodeAt(i/chrsz)&mask)<<(i%32);
        }
        return wa; // word[]
    • summary
      convert a string to a word array
    • returns
      word[]
  • dojox.encoding.digests.wordToString

    • type
      Function
    • parameters:
      • wa: (typeof word[])
    • source: [view]
        var s=[];
        for(var i=0, l=wa.length*32; i   s.push(String.fromCharCode((wa[i>>5]>>>(i%32))&mask));
        }
        return s.join(""); // string
    • summary
      convert an array of words to a string
    • returns
      string
  • dojox.encoding.digests.wordToHex

    • type
      Function
    • parameters:
      • wa: (typeof word[])
    • source: [view]
        var h="0123456789abcdef", s=[];
        for(var i=0, l=wa.length*4; i   s.push(h.charAt((wa[i>>2]>>((i%4)*8+4))&0xF)+h.charAt((wa[i>>2]>>((i%4)*8))&0xF));
        }
        return s.join(""); // string
    • summary
      convert an array of words to a hex tab
    • returns
      string
  • dojox.encoding.digests.wordToBase64

    • type
      Function
    • parameters:
      • wa: (typeof word[])
    • source: [view]
        var p="=", tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s=[];
        for(var i=0, l=wa.length*4; i   var t=(((wa[i>>2]>>8*(i%4))&0xFF)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&0xFF);
         for(var j=0; j<4; j++){
          if(i*8+j*6>wa.length*32){
           s.push(p);
          } else {
           s.push(tab.charAt((t>>6*(3-j))&0x3F));
          }
         }
        }
        return s.join(""); // string
    • summary
      convert an array of words to base64 encoding, should be more efficient
      than using dojox.encoding.base64
    • returns
      string
  • dojox.encoding.digests.outputTypes.Base64

    • summary
  • dojox.encoding.digests._base

    • type
      Object
    • summary
  • dojox.encoding.digests

    • type
      Object
    • summary
  • dojox.encoding

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary