Home
last modified time | relevance | path

Searched refs:kSize (Results 1 – 25 of 32) sorted by relevance

12

/openthread-latest/src/lib/spinel/
Dmulti_frame_buffer.hpp119 template <uint16_t kSize> class FrameBuffer : public FrameWritePointer
163 uint8_t mBuffer[kSize];
174 template <uint16_t kSize> class MultiFrameBuffer : public FrameWritePointer
195 mRemainingLength = kSize - kHeaderSize; in Clear()
223 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in SetLength()
253 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in SetSkipLength()
282 …uint16_t GetFrameMaxLength(void) const { return static_cast<uint16_t>(mBuffer + kSize - GetFrame()… in GetFrameMaxLength()
322 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in DiscardFrame()
444 uint8_t mBuffer[kSize];
/openthread-latest/src/core/common/
Dstring.hpp197 template <uint16_t kSize>
198 Error StringCopy(char (&aTargetBuffer)[kSize], in StringCopy() argument
202 return StringCopy(aTargetBuffer, kSize, aSource, aEncodingCheck); in StringCopy()
485 template <uint16_t kSize> class String : public StringWriter
487 static_assert(kSize > 0, "String buffer cannot be empty.");
506 char mBuffer[kSize];
/openthread-latest/src/core/net/
Dip6_address.cpp48 return Random::Crypto::FillBuffer(&m8[1], kSize - 1); in GenerateRandomUla()
84 (MatchLength(GetBytes(), aSubPrefix.m8, NetworkPrefix::kSize) >= NetworkPrefix::kLength); in ContainsPrefix()
133 OT_ASSERT(aMaxSize <= Address::kSize); in MatchLength()
213 if (GetBytesSize() < Address::kSize - 1) in ToString()
248 void InterfaceIdentifier::SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
307 Address::CopyBits(mFields.m8, aPrefix.GetBytes() + NetworkPrefix::kSize, in ApplyPrefix()
316 string.AppendHexBytes(mFields.m8, kSize); in ToString()
531 for (uint8_t i = 0; i < Ip4::Address::kSize; i++) in SynthesizeFromIp4Address()
557 uint8_t endIndex = kSize / sizeof(uint16_t); in ParseFrom()
600 endIndex -= Ip4::Address::kSize / sizeof(uint16_t); in ParseFrom()
[all …]
Dip6_address.hpp72 static constexpr uint8_t kSize = OT_IP6_PREFIX_SIZE; ///< Size in bytes. member in ot::Ip6::NetworkPrefix
73 static constexpr uint8_t kLength = kSize * kBitsPerByte; ///< Length of Network Prefix in bits.
343 …static constexpr uint8_t kSize = OT_IP6_IID_SIZE; ///< Size of an IPv6 Interface Identifier (in by… member in ot::Ip6::InterfaceIdentifier
529 static constexpr uint8_t kSize = OT_IP6_ADDRESS_SIZE; ///< Size of an IPv6 Address (in bytes). member in ot::Ip6::Address
572 void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
Dip4_types.cpp194 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
199 memcpy(mAddress.mFields.m8, aAddress, Ip4::Address::kSize); in Set()
Ddhcp6.hpp95 static constexpr uint16_t kSize = 3; ///< Transaction Id size (in bytes). member in ot::Dhcp6::TransactionId
111 uint8_t m8[kSize];
Dip4_types.hpp95 static constexpr uint16_t kSize = 4; ///< Size of an IPv4 Address (in bytes). member in ot::Ip4::Address
116 void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
/openthread-latest/src/core/thread/
Dkey_manager.cpp296 cryptoKey.Set(mNetworkKey.m8, NetworkKey::kSize); in ComputeKeys()
318 cryptoKey.Set(mNetworkKey.m8, NetworkKey::kSize); in ComputeTrelKey()
325 hkdf.Expand(kTrelInfoString, sizeof(kTrelInfoString), aKey.m8, Mac::Key::kSize); in ComputeTrelKey()
552 …essOrAssert(Crypto::Storage::ExportKey(mNetworkKeyRef, aNetworkKey.m8, NetworkKey::kSize, keyLen)); in GetNetworkKey()
553 OT_ASSERT(keyLen == NetworkKey::kSize); in GetNetworkKey()
571 SuccessOrAssert(Crypto::Storage::ExportKey(mPskcRef, aPskc.m8, Pskc::kSize, keyLen)); in GetPskc()
572 OT_ASSERT(keyLen == Pskc::kSize); in GetPskc()
607 … Crypto::Storage::kTypePersistent, aNetworkKey.m8, NetworkKey::kSize)); in StoreNetworkKey()
626 … Crypto::Storage::kTypePersistent, aPskc.m8, Pskc::kSize)); in StorePskc()
Dkey_manager.hpp141 …static constexpr uint8_t kSize = OT_NETWORK_KEY_SIZE; ///< Size of the Thread Network Key (in byte… member in ot::NetworkKey
169 static constexpr uint8_t kSize = OT_PSKC_MAX_SIZE; ///< Size (number of bytes) of the PSKc. member in ot::Pskc
Dnetwork_diagnostic.cpp122 if (count * Ip6::Address::kSize <= Tlv::kBaseTlvMaxLength) in AppendIp6AddressList()
127 tlv.SetLength(static_cast<uint8_t>(count * Ip6::Address::kSize)); in AppendIp6AddressList()
135 extTlv.SetLength(count * Ip6::Address::kSize); in AppendIp6AddressList()
1121 VerifyOrExit((tlvLength % Ip6::Address::kSize) == 0, error = kErrorParse); in GetNextDiagTlv()
1134 valueOffset += Ip6::Address::kSize; in GetNextDiagTlv()
1135 tlvLength -= Ip6::Address::kSize; in GetNextDiagTlv()
/openthread-latest/tests/unit/
Dtest_ecdsa.cpp98 DumpBuffer("PublicKey", publicKey.GetBytes(), Ecdsa::P256::PublicKey::kSize); in TestEcdsaVector()
100 …VerifyOrQuit(sizeof(kPublicKey) == Ecdsa::P256::PublicKey::kSize, "Example public key is invalid"); in TestEcdsaVector()
155 DumpBuffer("PublicKey", publicKey.GetBytes(), Ecdsa::P256::PublicKey::kSize); in TestEcdsaKeyGenerationSignAndVerify()
Dtest_lowpan.cpp1953 static constexpr uint16_t kSize = 0x7ef; in TestLowpanFragmentHeader() local
1975 firstFragHeader.Init(kSize, kTag); in TestLowpanFragmentHeader()
1989 VerifyOrQuit(fragHeader.GetDatagramSize() == kSize, "failed after ParseFrom()"); in TestLowpanFragmentHeader()
2002 nextFragHeader.Init(kSize, kTag, kOffset); in TestLowpanFragmentHeader()
2010 nextFragHeader.Init(kSize, kTag, kOffset + 1); in TestLowpanFragmentHeader()
2017 nextFragHeader.Init(kSize, kTag, kOffset + 7); in TestLowpanFragmentHeader()
2029 VerifyOrQuit(fragHeader.GetDatagramSize() == kSize, "failed after ParseFrom()"); in TestLowpanFragmentHeader()
2047 VerifyOrQuit(fragHeader.GetDatagramSize() == kSize, "failed after ParseFrom()"); in TestLowpanFragmentHeader()
Dtest_string.cpp44 template <uint16_t kSize> void PrintString(const char *aName, const String<kSize> aString) in PrintString()
/openthread-latest/src/core/mac/
Dmac_types.cpp335 … Crypto::Storage::kTypeVolatile, aKey.GetBytes(), Key::kSize)); in SetFrom()
354 SuccessOrAssert(Crypto::Storage::ExportKey(GetKeyRef(), aKey.m8, Key::kSize, keySize)); in ExtractKey()
366 aCryptoKey.Set(GetKey().GetBytes(), Key::kSize); in ConvertToCryptoKey()
Dmac_header_ie.hpp114 static constexpr uint8_t kSize = 2; member in ot::Mac::HeaderIe
121 uint8_t m8[kSize];
Dmac_types.hpp483 static constexpr uint16_t kSize = OT_MAC_KEY_SIZE; ///< Key size in bytes. member in ot::Mac::Key
/openthread-latest/src/core/crypto/
Decdsa.hpp98 … static constexpr uint8_t kSize = OT_CRYPTO_ECDSA_SIGNATURE_SIZE; ///< Signature size in bytes. member in ot::Crypto::Ecdsa::P256::Signature
305 …static constexpr uint8_t kSize = OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE; ///< Size of the public key in b… member in ot::Crypto::Ecdsa::P256::PublicKey
Dsha256.hpp75 static const uint8_t kSize = OT_CRYPTO_SHA256_HASH_SIZE; ///< SHA-256 hash size (bytes) member in ot::Crypto::Sha256::Hash
Dsha256.cpp72 …inish(Hash &aHash) { SuccessOrAssert(otPlatCryptoSha256Finish(&mContext, aHash.m8, Hash::kSize)); } in Finish()
Dhmac_sha256.cpp61 SuccessOrAssert(otPlatCryptoHmacSha256Finish(&mContext, aHash.m8, Hash::kSize)); in Finish()
Dcrypto_platform.cpp594 … Sha256::Hash::kSize, MBEDTLS_MD_SHA256, MbedTls::CryptoSecurePrng, nullptr); in otPlatCryptoEcdsaSign()
597 Sha256::Hash::kSize, MBEDTLS_MD_SHA256); in otPlatCryptoEcdsaSign()
649 …ret = mbedtls_ecdsa_verify(&ecdsa.MBEDTLS_PRIVATE(grp), aHash->m8, Sha256::Hash::kSize, &ecdsa.MBE… in otPlatCryptoEcdsaVerify()
/openthread-latest/src/core/utils/
Dslaac_address.hpp74 … static constexpr uint16_t kSize = 32; ///< Secret key size for generating semantically opaque IID. member
76 uint8_t m8[kSize];
Dslaac_address.cpp428 static_assert(sizeof(hash) >= Ip6::InterfaceIdentifier::kSize, in GenerateIid()
/openthread-latest/src/cli/
Dcli_utils.hpp205 static constexpr uint16_t kSize = 21; ///< Size of a buffer member
207 char mChars[kSize]; ///< Char array (do not access the array directly).
416 static constexpr uint16_t kSize = 7; ///< Size of a buffer member
418 char mChars[kSize]; ///< Char array (do not access the array directly).
/openthread-latest/src/core/meshcop/
Dtcat_agent.cpp685 SuccessOrExit(error = VerifyHash(aIncomingMessage, aOffset, aLength, pskc.m8, Pskc::kSize)); in HandlePresentPskcHash()
738 Crypto::HmacSha256::Hash::kSize)); in HandleRequestPskdHash()
754 VerifyOrExit(aLength == Crypto::HmacSha256::Hash::kSize, error = kErrorSecurity); in VerifyHash()

12