m_BufferLen=2/*blinded sig type*/+32/*blinded pub key*/+4/*published*/+2/*expires*/+2/*flags*/+2/*lenOuterCiphertext*/+lenOuterCiphertext+64/*signature*/;
if(authType==ENCRYPTED_LEASESET_AUTH_TYPE_DH)layer1Flags|=0x01;// DH, authentication scheme 0, auth bit 1
elseif(authType==ENCRYPTED_LEASESET_AUTH_TYPE_PSK)layer1Flags|=0x03;// PSK, authentication scheme 1, auth bit 1
if(layer1Flags)
{
m_BufferLen+=32+2+authKeys->size()*40;// auth data len
lenOuterCiphertext+=32+2+authKeys->size()*40;
}
}
lenOuterPlaintext+=32+2+authKeys->size()*40;// auth data len
}
size_tlenOuterCiphertext=lenOuterPlaintext+32;
m_BufferLen=2/*blinded sig type*/+32/*blinded pub key*/+4/*published*/+2/*expires*/+2/*flags*/+2/*lenOuterCiphertext*/+lenOuterCiphertext+64/*signature*/;