本文整理汇总了C++中OTPassword::getPassword_uint8方法的典型用法代码示例。如果您正苦于以下问题:C++ OTPassword::getPassword_uint8方法的具体用法?C++ OTPassword::getPassword_uint8怎么用?C++ OTPassword::getPassword_uint8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTPassword
的用法示例。
在下文中一共展示了OTPassword::getPassword_uint8方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
OTPassword::OTPassword(const OTPassword& rhs)
: size_(0)
, isText_(rhs.isPassword())
, isBinary_(rhs.isMemory())
, isPageLocked_(false)
, blockSize_(
rhs.blockSize_) // The buffer has this size+1 as its static size.
{
if (isText_) {
data_[0] = '\0';
setPassword_uint8(rhs.getPassword_uint8(), rhs.getPasswordSize());
}
else if (isBinary_) {
setMemory(rhs.getMemory_uint8(), rhs.getMemorySize());
}
}
示例2: if
OTPassword::OTPassword(const OTPassword & rhs)
: m_nPasswordSize(0),
m_bIsText(rhs.isPassword()),
m_bIsBinary(rhs.isMemory()),
m_bIsPageLocked(false),
m_theBlockSize(rhs.m_theBlockSize) // The buffer has this size+1 as its static size.
{
if (m_bIsText)
{
m_szPassword[0] = '\0';
setPassword_uint8(rhs.getPassword_uint8(), rhs.getPasswordSize());
}
else if (m_bIsBinary)
{
setMemory(rhs.getMemory_uint8(), rhs.getMemorySize());
}
}
示例3: Compare
bool OTPassword::Compare(OTPassword& rhs) const
{
OT_ASSERT(isPassword() || isMemory());
OT_ASSERT(rhs.isPassword() || rhs.isMemory());
if (isPassword() && !rhs.isPassword()) return false;
if (isMemory() && !rhs.isMemory()) return false;
const uint32_t nThisSize =
isPassword() ? getPasswordSize() : getMemorySize();
const uint32_t nRhsSize =
rhs.isPassword() ? rhs.getPasswordSize() : rhs.getMemorySize();
if (nThisSize != nRhsSize) return false;
if (0 ==
memcmp(isPassword() ? getPassword_uint8() : getMemory_uint8(),
rhs.isPassword() ? rhs.getPassword_uint8()
: rhs.getMemory_uint8(),
rhs.isPassword() ? rhs.getPasswordSize() : rhs.getMemorySize()))
return true;
return false;
}