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

Method verify

projects/JavaScript/proto/test.js:3689–3700  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

3687 * @returns {!boolean} Model valid state
3688 */
3689 verify () {
3690 if ((this.buffer.offset + this.model.fbeOffset - 4) > this.buffer.size) {
3691 return false
3692 }
3693
3694 let fbeFullSize = this.readUInt32(this.model.fbeOffset - 4)
3695 if (fbeFullSize < this.model.fbeSize) {
3696 return false
3697 }
3698
3699 return this.model.verify()
3700 }
3701
3702 /**
3703 * 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