in src/utils.js [293:307]
slice(start = 0, end = this.tell()) {
if (end < 0) {
end = this.tell() + end;
}
if (start < 0) {
throw new TLSError(ALERT_DESCRIPTION.INTERNAL_ERROR);
}
if (end < 0) {
throw new TLSError(ALERT_DESCRIPTION.INTERNAL_ERROR);
}
if (end > this.length()) {
throw new TLSError(ALERT_DESCRIPTION.INTERNAL_ERROR);
}
return this._buffer.slice(start, end);
}