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