"expand 32-byte k"
979742
function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) {
  var z = new Uint8Array(16), x = new Uint8Array(64);
  var u, i;
  for (i = 0; i < 16; i++) z[i] = 0;
  for (i = 0; i < 8; i++) z[i] = n[i];
  while (b >= 64) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i];
    u = 1;
    for (i = 8; i < 16; i++) {
      u = u + (z[i] & 0xff) | 0;
      z[i] = u & 0xff;
      u >>>= 8;
    }
    b -= 64;
    cpos += 64;
    mpos += 64;
  }
  if (b > 0) {
    crypto_core_salsa20(x,z,k,sigma);
    for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i];
  }
  return 0;
}
688788
function(key,size)
		{
			var expandedKeySize = (16*(this.numberOfRounds(size)+1));
			
			/* current expanded keySize, in bytes */
			var currentSize = 0;
			var rconIteration = 1;
			var t = [];   // temporary 4-byte variable
			
			var expandedKey = [];
			for(var i = 0;i < expandedKeySize;i++)
				expandedKey[i] = 0;
		
			/* set the 16,24,32 bytes of the expanded key to the input key */
			for (var j = 0; j < size; j++)
				expandedKey[j] = key[j];
			currentSize += size;
		
			while (currentSize < expandedKeySize)
			{
				/* assign the previous 4 bytes to the temporary value t */
				for (var k = 0; k < 4; k++)
					t[k] = expandedKey[(currentSize - 4) + k];
		
				/* every 16,24,32 bytes we apply the core schedule to t
				 * and increment rconIteration afterwards
				 */
				if(currentSize % size == 0)
					t = this.core(t, rconIteration++);
		
				/* For 256-bit keys, we add an extra sbox to the calculation */
				if(size == this.keySize.SIZE_256 && ((currentSize % size) == 16))
					for(var l = 0; l < 4; l++)
						t[l] = this.sbox[t[l]];
		
				/* We XOR t with the four-byte block 16,24,32 bytes before the new expanded key.
				 * This becomes the next four bytes in the expanded key.
				 */
				for(var m = 0; m < 4; m++) {
					expandedKey[currentSize] = expandedKey[currentSize - size] ^ t[m];
					currentSize++;
				}
			}
			return expandedKey;
		}
444772
function keyExpansion(key) {  // generate Key Schedule (byte-array Nr+1 x Nb) from Key [�5.2]
        var Nb = 4; // Number of columns (32-bit words) comprising the State. For this standard, Nb = 4.
        var Nk = key.length / 4;  // Number of 32-bit words comprising the Cipher Key. Nk = 4/6/8 for 128/192/256-bit keys
        var Nr = Nk + 6;       // Number of rounds. Nr = 10/12/14 for 128/192/256-bit keys
        var trace;

        var w = new Array(Nb * (Nr + 1));
        var temp = new Array(4);

        for (var i = 0; i < Nk; i++) {
            var r = [key[4 * i], key[4 * i + 1], key[4 * i + 2], key[4 * i + 3]];
            w[i] = r;
            /*
             trace = new Array(4);
             for (var t = 0; t < 4; t++) trace[t] = String.fromCharCode(w[i][t]);
             console.log('w['+i+']='+fidj.Hex.encode(trace.join('')));
             */
        }

        for (var i = Nk; i < (Nb * (Nr + 1)); i++) {
            w[i] = new Array(4);
            for (var t = 0; t < 4; t++) temp[t] = w[i - 1][t];
            if (i % Nk == 0) {
                temp = subWord(rotWord(temp));
                for (var t = 0; t < 4; t++) temp[t] ^= rCon[i / Nk][t];
            } else if (Nk > 6 && i % Nk == 4) {
                temp = subWord(temp);
            }
            for (var t = 0; t < 4; t++) w[i][t] = w[i - Nk][t] ^ temp[t];
            /*
             trace = new Array(4);
             for (var t = 0; t < 4; t++) trace[t] = String.fromCharCode(w[i][t]);
             console.log('w['+i+']='+fidj.Hex.encode(trace.join('')));
             */
        }

        return w;
    }
426384
function aesKeyWrap(cek, key, bits) {
  let bytes = bits >> 3;
  if (typeof key === 'string') {
    key = Buffer.from(key, 'base64');
  } else if (!(key instanceof Buffer)) {
    throw new TypeError('Key must be a buffer or a base64-encoded string');
  }
  if (key.length < bytes) {
    throw new TypeError(`Key length must be at least ${bytes} bytes`);
  }
  key = key.slice(0, bytes);
  let r = [];
  for (let i = 0; i < cek.length; i += 8) {
    r.push(cek.slice(i, i + 8));
  }
  let iv = Buffer.alloc(16);
  let a = Buffer.from('A6A6A6A6A6A6A6A6', 'hex');
  let count = 1;
  for (let j = 0; j < 6; j++) {
    for (let i = 0; i < r.length; i++) {
      let cipher = crypto.createCipheriv(`AES${bits}`, key, iv);
      let c = `000000000000000${count.toString(16)}`.slice(-16);
      let b = cipher.update(Buffer.concat([a, r[i]]));
      a = Buffer.from(c, 'hex');
      for (let n = 0; n < 8; n++) {
        a[n] ^= b[n];
      }
      r[i] = b.slice(8, 16);
      count++;
    }
  }
  return buf2b64url(Buffer.concat([a].concat(r)));
}
500685
public FP64 extend(int i) {
    extend((byte)((i >>> 24) & 0xFF));
    extend((byte)((i >>> 16) & 0xFF));
    extend((byte)((i >>> 8) & 0xFF));
    extend((byte)((i) & 0xFF));
    return this;
  }
891048
static public byte[] expandByteArray(byte[] src, byte[] dst) {
        int srcLength = (null != src) ? src.length : 0;
        int dstLength = (null != dst) ? dst.length : 0;
        return expandByteArray(src, dst, 0, srcLength, 0, dstLength);
    }
177012
static public byte[] expandByteArray(byte[] src, byte[] dst, int srcPos, int srcLength, int dstPos, int dstLength) {
        byte[] rc = null;
        int totalLen = 0;
        if (null != src) {
            totalLen += srcLength;
        }
        if (null != dst) {
            totalLen += dstLength;
        }
        if (0 < totalLen) {
            rc = new byte[totalLen];
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Created byte[] of size " + totalLen);
            }
            try {
                if (null != src) {
                    System.arraycopy(src, srcPos, rc, 0, srcLength);
                }
                if (null != dst) {
                    System.arraycopy(dst, dstPos, rc, srcLength, dstLength);
                }
            } catch (Exception e) {
                // no FFDC required
                // any error from arraycopy, we'll just return null
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Exception " + e + " while copying.");
                }
                rc = null;
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "expandByteArray returning: [" + getEnglishString(rc) + "]");
        }
        return rc;
    }
342420
static public byte[] expandByteArray(byte[] src, byte b) {

        int srcLength = (null != src) ? src.length : 0;
        int totalLen = srcLength + 1;
        byte[] rc = new byte[totalLen];
        try {
            if (null != src) {
                System.arraycopy(src, 0, rc, 0, srcLength);
            }
            rc[srcLength] = b;
        } catch (Exception e) {
            // no FFDC required
            // any error from arraycopy, we'll just return null
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Exception " + e + " while copying.");
            }
            rc = null;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc,
                     "expandByteArray returning: [" + getEnglishString(rc) + "]");
        }
        return rc;
    }
929469
function put_byte(c) {
		outbuf[outoff + outcnt++] = c;
		if (outoff + outcnt === OUTBUFSIZ) {
			qoutbuf();
		}
	}
627689
def target_from_compact(bits):
    """"""
    size = bits >> 24
    word = bits & 0x007fffff
    if size < 3:
        word >>= 8 * (3 - size)
    else:
        word <<= 8 * (size - 3)
    if bits & 0x00800000:
        word = -word
    return word
554666
public void addPush(double k) {
        if (k == 0.0) {
            // zero
            add(ByteCode.DCONST_0);
            if (1.0 / k < 0) {
                // Negative zero
                add(ByteCode.DNEG);
            }
        } else if (k == 1.0 || k == -1.0) {
            add(ByteCode.DCONST_1);
            if (k < 0) {
                add(ByteCode.DNEG);
            }
        } else {
            addLoadConstant(k);
        }
    }
1325282
private void enlargeCapacity(int key) {
	int diff = offCount - offset;

	int newSize = arr.length;
	if (newSize < 1) newSize = 1;
	while (newSize < key + offset + diff) {
	    newSize *= 2;
	}
	if (newSize > arr.length) {
	    Object[] na = new Object[newSize];
	    for (int i = offset; i < offset + size; i++) {
		na[i + diff] = arr[i];
	    }
	    arr = na;
	    offset += diff;
	}
    }
617883
function bytes(b) {
    if (!readable) return b;

    var tb = ((1 << 30) * 1024)
      , gb = 1 << 30
      , mb = 1 << 20
      , kb = 1 << 10
      , abs = Math.abs(b);

    if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb';
    if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb';
    if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb';
    if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb';

    return b + 'b';
  }
191444
private void expand()
    {
        int i;
        if (isCompact) {
            byte[]  tempArray;
            hashes = new int[INDEXCOUNT];
            tempArray = new byte[UNICODECOUNT];
            for (i = 0; i < UNICODECOUNT; ++i) {
                byte value = elementAt((char)i);
                tempArray[i] = value;
                touchBlock(i >> BLOCKSHIFT, value);
            }
            for (i = 0; i < INDEXCOUNT; ++i) {
                indices[i] = (char)(i<<BLOCKSHIFT);
            }
            values = null;
            values = tempArray;
            isCompact = false;
        }
    }
1279372
def _expand_disk(disk):
    '''
    
    '''
    ret = {}
    ret.update(disk.__dict__)
    zone = ret['extra']['zone']
    ret['extra']['zone'] = {}
    ret['extra']['zone'].update(zone.__dict__)
    return ret
19538
public static long bytesToLong(byte[] bytes, int offset) {
        long result = 0x0;
        for (int i = offset; i < offset + 8; ++i) {
            result = result << 8;
            result |= (bytes[i] & 0x00000000000000FFl);
        }
        return result;
    }
287542
function _update(s, w, bytes) {
  // consume 512 bit (64 byte) chunks
  var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h;
  var len = bytes.length();
  while(len >= 64) {
    // the w array will be populated with sixteen 32-bit big-endian words
    // and then extended into 64 32-bit words according to SHA-256
    for(i = 0; i < 16; ++i) {
      w[i] = bytes.getInt32();
    }
    for(; i < 64; ++i) {
      // XOR word 2 words ago rot right 17, rot right 19, shft right 10
      t1 = w[i - 2];
      t1 =
        ((t1 >>> 17) | (t1 << 15)) ^
        ((t1 >>> 19) | (t1 << 13)) ^
        (t1 >>> 10);
      // XOR word 15 words ago rot right 7, rot right 18, shft right 3
      t2 = w[i - 15];
      t2 =
        ((t2 >>> 7) | (t2 << 25)) ^
        ((t2 >>> 18) | (t2 << 14)) ^
        (t2 >>> 3);
      // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32
      w[i] = (t1 + w[i - 7] + t2 + w[i - 16]) | 0;
    }

    // initialize hash value for this chunk
    a = s.h0;
    b = s.h1;
    c = s.h2;
    d = s.h3;
    e = s.h4;
    f = s.h5;
    g = s.h6;
    h = s.h7;

    // round function
    for(i = 0; i < 64; ++i) {
      // Sum1(e)
      s1 =
        ((e >>> 6) | (e << 26)) ^
        ((e >>> 11) | (e << 21)) ^
        ((e >>> 25) | (e << 7));
      // Ch(e, f, g) (optimized the same way as SHA-1)
      ch = g ^ (e & (f ^ g));
      // Sum0(a)
      s0 =
        ((a >>> 2) | (a << 30)) ^
        ((a >>> 13) | (a << 19)) ^
        ((a >>> 22) | (a << 10));
      // Maj(a, b, c) (optimized the same way as SHA-1)
      maj = (a & b) | (c & (a ^ b));

      // main algorithm
      t1 = h + s1 + ch + _k[i] + w[i];
      t2 = s0 + maj;
      h = g;
      g = f;
      f = e;
      e = (d + t1) | 0;
      d = c;
      c = b;
      b = a;
      a = (t1 + t2) | 0;
    }

    // update hash state
    s.h0 = (s.h0 + a) | 0;
    s.h1 = (s.h1 + b) | 0;
    s.h2 = (s.h2 + c) | 0;
    s.h3 = (s.h3 + d) | 0;
    s.h4 = (s.h4 + e) | 0;
    s.h5 = (s.h5 + f) | 0;
    s.h6 = (s.h6 + g) | 0;
    s.h7 = (s.h7 + h) | 0;
    len -= 64;
  }
}