lib/asn1ber.js
function wrapper(type, contents) {
    var buf, len, i;

    // Get the encoded length of the contents
    len = lengthArray(contents.length);

    // Set up a buffer with the type and length bytes plus a straight copy of the content.
    buf = new Buffer(1 + contents.length + len.length);
    buf[0] = type;
    for (i = 1; i < len.length + 1; i++) {
        buf[i] = len[i - 1];
    }
    contents.copy(buf, len.length + 1, 0);
    return buf;
}
function wrapper(type, contents) {
    var buf, len, i;

    // Get the encoded length of the contents
    len = lengthArray(contents.length);

    // Set up a buffer with the type and length bytes plus a straight copy of the content.
    buf = new Buffer(1 + contents.length + len.length);
    buf[0] = type;
    for (i = 1; i < len.length + 1; i++) {
        buf[i] = len[i - 1];
    }
    contents.copy(buf, len.length + 1, 0);
    return buf;
}
Return a wrapped copy of the passed `contents`, with the specified wrapper type. This is used for Sequence and other constructed types.