// automatically generated by the FlatBuffers compiler, do not modify /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ import * as flatbuffers from 'flatbuffers'; import { Hash } from '../model/hash'; import { SaltLength } from '../model/salt-length'; export class VerifyPSSRequest { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):VerifyPSSRequest { this.bb_pos = i; this.bb = bb; return this; } static getRootAsVerifyPSSRequest(bb:flatbuffers.ByteBuffer, obj?:VerifyPSSRequest):VerifyPSSRequest { return (obj || new VerifyPSSRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsVerifyPSSRequest(bb:flatbuffers.ByteBuffer, obj?:VerifyPSSRequest):VerifyPSSRequest { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new VerifyPSSRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } signature():string|null signature(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null signature(optionalEncoding?:any):string|Uint8Array|null { const offset = this.bb!.__offset(this.bb_pos, 4); return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } message():string|null message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null message(optionalEncoding?:any):string|Uint8Array|null { const offset = this.bb!.__offset(this.bb_pos, 6); return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } hash():Hash { const offset = this.bb!.__offset(this.bb_pos, 8); return offset ? this.bb!.readInt32(this.bb_pos + offset) : Hash.MD5; } mutate_hash(value:Hash):boolean { const offset = this.bb!.__offset(this.bb_pos, 8); if (offset === 0) { return false; } this.bb!.writeInt32(this.bb_pos + offset, value); return true; } saltLength():SaltLength { const offset = this.bb!.__offset(this.bb_pos, 10); return offset ? this.bb!.readInt32(this.bb_pos + offset) : SaltLength.AUTO; } mutate_salt_length(value:SaltLength):boolean { const offset = this.bb!.__offset(this.bb_pos, 10); if (offset === 0) { return false; } this.bb!.writeInt32(this.bb_pos + offset, value); return true; } publicKey():string|null publicKey(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null publicKey(optionalEncoding?:any):string|Uint8Array|null { const offset = this.bb!.__offset(this.bb_pos, 12); return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } static startVerifyPSSRequest(builder:flatbuffers.Builder) { builder.startObject(5); } static addSignature(builder:flatbuffers.Builder, signatureOffset:flatbuffers.Offset) { builder.addFieldOffset(0, signatureOffset, 0); } static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { builder.addFieldOffset(1, messageOffset, 0); } static addHash(builder:flatbuffers.Builder, hash:Hash) { builder.addFieldInt32(2, hash, Hash.MD5); } static addSaltLength(builder:flatbuffers.Builder, saltLength:SaltLength) { builder.addFieldInt32(3, saltLength, SaltLength.AUTO); } static addPublicKey(builder:flatbuffers.Builder, publicKeyOffset:flatbuffers.Offset) { builder.addFieldOffset(4, publicKeyOffset, 0); } static endVerifyPSSRequest(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } static createVerifyPSSRequest(builder:flatbuffers.Builder, signatureOffset:flatbuffers.Offset, messageOffset:flatbuffers.Offset, hash:Hash, saltLength:SaltLength, publicKeyOffset:flatbuffers.Offset):flatbuffers.Offset { VerifyPSSRequest.startVerifyPSSRequest(builder); VerifyPSSRequest.addSignature(builder, signatureOffset); VerifyPSSRequest.addMessage(builder, messageOffset); VerifyPSSRequest.addHash(builder, hash); VerifyPSSRequest.addSaltLength(builder, saltLength); VerifyPSSRequest.addPublicKey(builder, publicKeyOffset); return VerifyPSSRequest.endVerifyPSSRequest(builder); } }