Home
last modified time | relevance | path

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

12

/openthread-3.4.0/src/lib/hdlc/
Dhdlc.hpp135 template <uint16_t kSize> class FrameBuffer : public FrameWritePointer
184 uint8_t mBuffer[kSize];
196 template <uint16_t kSize> class MultiFrameBuffer : public FrameWritePointer
219 mRemainingLength = kSize - kHeaderSize; in Clear()
249 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in SetLength()
281 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in SetSkipLength()
313 …uint16_t GetFrameMaxLength(void) const { return static_cast<uint16_t>(mBuffer + kSize - GetFrame()… in GetFrameMaxLength()
328 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in SaveFrame()
341 mRemainingLength = static_cast<uint16_t>(mBuffer + kSize - mWritePointer); in DiscardFrame()
454 uint8_t mBuffer[kSize];
/openthread-3.4.0/src/core/net/
Dip6_address.cpp61 return Random::Crypto::FillBuffer(&m8[1], kSize - 1); in GenerateRandomUla()
96 (MatchLength(GetBytes(), aSubPrefix.m8, NetworkPrefix::kSize) >= NetworkPrefix::kLength); in ContainsPrefix()
145 OT_ASSERT(aMaxSize <= Address::kSize); in MatchLength()
225 if (GetBytesSize() < Address::kSize - 1) in ToString()
258 …dentifier::GenerateRandom(void) { SuccessOrAssert(Random::Crypto::FillBuffer(mFields.m8, kSize)); } in GenerateRandom()
260 void InterfaceIdentifier::SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
319 Address::CopyBits(mFields.m8, aPrefix.GetBytes() + NetworkPrefix::kSize, in ApplyPrefix()
328 string.AppendHexBytes(mFields.m8, kSize); in ToString()
525 for (uint8_t i = 0; i < Ip4::Address::kSize; i++) in SynthesizeFromIp4Address()
551 uint8_t endIndex = kSize / sizeof(uint16_t); in ParseFrom()
[all …]
Dip6_address.hpp76 static constexpr uint8_t kSize = OT_IP6_PREFIX_SIZE; ///< Size in bytes. member in ot::Ip6::NetworkPrefix
376 …static constexpr uint8_t kSize = OT_IP6_IID_SIZE; ///< Size of an IPv6 Interface Identifier (in by… member in ot::Ip6::InterfaceIdentifier
583 static constexpr uint8_t kSize = OT_IP6_ADDRESS_SIZE; ///< Size of an IPv6 Address (in bytes). member in ot::Ip6::Address
630 void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
Ddhcp6.hpp101 static constexpr uint16_t kSize = 3; ///< Transaction Id size (in bytes). member in ot::Dhcp6::TransactionId
110 Error GenerateRandom(void) { return Random::Crypto::FillBuffer(m8, kSize); } in GenerateRandom()
113 uint8_t m8[kSize];
Dip4_types.cpp181 … (Ip6::Prefix::MatchLength(GetBytes(), aOther.GetBytes(), Ip4::Address::kSize) >= mLength); in operator ==()
186 memcpy(mAddress.mFields.m8, aAddress, Ip4::Address::kSize); in Set()
Dip4_types.hpp102 static constexpr uint16_t kSize = 4; ///< Size of an IPv4 Address (in bytes). member in ot::Ip4::Address
126 void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } in SetBytes()
/openthread-3.4.0/src/core/meshcop/
Ddataset_local.cpp248 networkKeyTlv->GetNetworkKey().m8, NetworkKey::kSize)); in MoveKeysToSecureStorage()
259 pskcTlv->GetPskc().m8, Pskc::kSize)); in MoveKeysToSecureStorage()
282 error = ExportKey(networkKeyRef, networkKey.m8, NetworkKey::kSize, keyLen); in EmplaceSecurelyStoredKeys()
291 OT_ASSERT(keyLen == NetworkKey::kSize); in EmplaceSecurelyStoredKeys()
301 error = ExportKey(pskcRef, pskc.m8, Pskc::kSize, keyLen); in EmplaceSecurelyStoredKeys()
310 OT_ASSERT(keyLen == Pskc::kSize); in EmplaceSecurelyStoredKeys()
/openthread-3.4.0/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()
523 …essOrAssert(Crypto::Storage::ExportKey(mNetworkKeyRef, aNetworkKey.m8, NetworkKey::kSize, keyLen)); in GetNetworkKey()
524 OT_ASSERT(keyLen == NetworkKey::kSize); in GetNetworkKey()
542 SuccessOrAssert(Crypto::Storage::ExportKey(mPskcRef, aPskc.m8, Pskc::kSize, keyLen)); in GetPskc()
543 OT_ASSERT(keyLen == Pskc::kSize); in GetPskc()
578 … Crypto::Storage::kTypePersistent, aNetworkKey.m8, NetworkKey::kSize)); in StoreNetworkKey()
597 … 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
172 static constexpr uint8_t kSize = OT_PSKC_MAX_SIZE; ///< Size (number of bytes) of the PSKc. member in ot::Pskc
Dnetwork_diagnostic.cpp148 if (count * Ip6::Address::kSize <= Tlv::kBaseTlvMaxLength) in AppendIp6AddressList()
153 tlv.SetLength(static_cast<uint8_t>(count * Ip6::Address::kSize)); in AppendIp6AddressList()
161 extTlv.SetLength(count * Ip6::Address::kSize); in AppendIp6AddressList()
745 VerifyOrExit((tlvLength % Ip6::Address::kSize) == 0, error = kErrorParse); in GetNextDiagTlv()
758 valueOffset += Ip6::Address::kSize; in GetNextDiagTlv()
759 tlvLength -= Ip6::Address::kSize; in GetNextDiagTlv()
/openthread-3.4.0/src/cli/
Dcli_output.hpp212 static constexpr uint16_t kSize = 21; ///< Size of a buffer member
214 char mChars[kSize]; ///< Char array (do not access the array directly).
449 static constexpr uint16_t kSize = 7; ///< Size of a buffer member
451 char mChars[kSize]; ///< Char array (do not access the array directly).
/openthread-3.4.0/src/core/common/
Dstring.hpp401 template <uint16_t kSize> class String : public StringWriter
403 static_assert(kSize > 0, "String buffer cannot be empty.");
424 char mBuffer[kSize];
/openthread-3.4.0/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.cpp285 static_assert(sizeof(hash) >= Ip6::InterfaceIdentifier::kSize, in GenerateIid()
/openthread-3.4.0/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-3.4.0/src/core/mac/
Dmac_types.cpp292 … Crypto::Storage::kTypeVolatile, aKey.GetBytes(), Key::kSize)); in SetFrom()
311 SuccessOrAssert(Crypto::Storage::ExportKey(GetKeyRef(), aKey.m8, Key::kSize, keySize)); in ExtractKey()
323 aCryptoKey.Set(GetKey().GetBytes(), Key::kSize); in ConvertToCryptoKey()
Dmac_frame.hpp130 static constexpr uint8_t kSize = 2; member in ot::Mac::HeaderIe
137 uint8_t m8[kSize];
Dmac_types.hpp442 static constexpr uint16_t kSize = OT_MAC_KEY_SIZE; ///< Key size in bytes. member in ot::Mac::Key
/openthread-3.4.0/src/core/crypto/
Decdsa.hpp102 … static constexpr uint8_t kSize = OT_CRYPTO_ECDSA_SIGNATURE_SIZE; ///< Signature size in bytes. member in ot::Crypto::Ecdsa::P256::Signature
328 …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.hpp78 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()

12