packages/cafeteria/plugins/cordova-plugin-secure-storage/www/sjcl_ss.js
function (prf, plaintext, iv, adata, tlen) {
    var out, data = plaintext.slice(0), w=sjcl.bitArray;
    tlen = tlen || 128;
    adata = adata || [];

    // encrypt and tag
    out = sjcl.mode.gcm._ctrMode(true, prf, data, adata, iv, tlen);

    return w.concat(out.data, out.tag);
  }
function (prf, plaintext, iv, adata, tlen) {
    var out, data = plaintext.slice(0), w=sjcl.bitArray;
    tlen = tlen || 128;
    adata = adata || [];

    // encrypt and tag
    out = sjcl.mode.gcm._ctrMode(true, prf, data, adata, iv, tlen);

    return w.concat(out.data, out.tag);
  }
function ( prf , plaintext , iv , adata , tlen ) { var out , data = plaintext . slice ( 0 ) , w = sjcl . bitArray ; tlen = tlen || 128 ; adata = adata || [ ] ; // encrypt and tag out = sjcl . mode . gcm . _ctrMode ( true , prf , data , adata , iv , tlen ) ; return w . concat ( out . data , out . tag ) ; }
Encrypt in GCM mode.
@static
@param {Object} prf The pseudorandom function.  It must have a block size of 16 bytes.
@param {bitArray} plaintext The plaintext data.
@param {bitArray} iv The initialization value.
@param {bitArray} [adata=[]] The authenticated data.
@param {Number} [tlen=128] The desired tag length, in bits.
@return {bitArray} The encrypted data, an array of bytes.
Encrypt in GCM mode .