MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / verify

Method verify

projects/JavaScript/proto/test.js:8615–8626  ·  view source on GitHub ↗

* Check if the struct value is valid * @this {!StructOptionalModel} * @returns {!boolean} Model valid state

()

Source from the content-addressed store, hash-verified

8613 * @returns {!boolean} Model valid state
8614 */
8615 verify () {
8616 if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) {
8617 return false
8618 }
8619
8620 let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4)
8621 if (fbeFullSize < this.model.fbeSize) {
8622 return false
8623 }
8624
8625 return this.model.verify()
8626 }
8627
8628 /**
8629 * Create a new model (begin phase)

Callers

nothing calls this directly

Calls 2

readUInt32Method · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected