docs: function(prf, plaintext, iv, adata, tlen) {
      var L, out = plaintext.slice(0), tag, w=sjcl.bitArray, ivl = w.bitLength(iv) / 8, ol = w.bitLength(out) / 8;
      tlen = tlen || 64;
      adata = adata || [];
  
      if (ivl < 7) {
        throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes");
      }
  
      // compute the length of the length
      for (L=2; L<4 && ol >>> 8*L; L++) {}
      if (L < 15 - ivl) { L = 15-ivl; }
      iv = w.clamp(iv,8*(15-L));
  
      // compute the tag
      tag = sjcl.mode.ccm._computeTag(prf, plaintext, iv, adata, tlen, L);
  
      // encrypt
      out = sjcl.mode.ccm._ctrMode(prf, out, iv, tag, tlen, L);
  
      return w.concat(out.data, out.tag);
    }