nl :: Dệt :: Hồ sơ :: Bảo vệ:: AppKeys :: GroupKeyStoreBase
Đây là một lớp trừu tượng.#include <src/lib/profiles/security/WeaveApplicationKeys.h>
Định nghĩa của lớp cửa hàng khóa nhóm Weave.
Tóm lược
Các hàm trong lớp này được gọi để quản lý các khóa nhóm ứng dụng.
Di sản
Các lớp con đã biết trực tiếp:nl :: Weave :: DeviceLayer :: Internal :: GroupKeyStoreImpl
nl :: Weave :: DeviceLayer :: Internal :: GroupKeyStoreImpl
nl :: Weave :: DeviceLayer :: Internal :: GroupKeyStoreImpl
nl :: Weave :: Profiles :: Security :: AppKeys :: DummyGroupKeyStore
Thuộc tính được bảo vệ | |
---|---|
LastUsedEpochKeyId | uint32_t |
NextEpochKeyStartTime | uint32_t |
Chức năng công cộng | |
---|---|
Clear (void)=0 | virtual WEAVE_ERROR |
DeleteGroupKey (uint32_t keyId)=0 | virtual WEAVE_ERROR |
DeleteGroupKeysOfAType (uint32_t keyType)=0 | virtual WEAVE_ERROR |
DeriveApplicationKey (uint32_t & appKeyId, const uint8_t *keySalt, uint8_t saltLen, const uint8_t *keyDiversifier, uint8_t diversifierLen, uint8_t *appKey, uint8_t keyBufSize, uint8_t keyLen, uint32_t & appGroupGlobalId) | Xuất phát từ khóa ứng dụng. |
EnumerateGroupKeys (uint32_t keyType, uint32_t *keyIds, uint8_t keyIdsArraySize, uint8_t & keyCount)=0 | virtual WEAVE_ERROR |
GetCurrentAppKeyId (uint32_t keyId, uint32_t & curKeyId) | Trả về ID khóa hiện tại. |
GetCurrentUTCTime (uint32_t & utcTime) | virtual WEAVE_ERROR Nhận thời gian UTC của nền tảng hiện tại chỉ trong vài giây. |
GetGroupKey (uint32_t keyId, WeaveGroupKey & groupKey) | Nhận khóa nhóm ứng dụng. |
RetrieveGroupKey (uint32_t keyId, WeaveGroupKey & key)=0 | virtual WEAVE_ERROR |
StoreGroupKey (const WeaveGroupKey & key)=0 | virtual WEAVE_ERROR |
Các chức năng được bảo vệ | |
---|---|
Init (void) | void Khởi tạo thông số lưu trữ khóa nhóm cục bộ. |
OnEpochKeysChange (void) | void Trả về ID khóa hiện tại. |
RetrieveLastUsedEpochKeyId (void)=0 | virtual WEAVE_ERROR |
StoreLastUsedEpochKeyId (void)=0 | virtual WEAVE_ERROR |
Thuộc tính được bảo vệ
LastUsedEpochKeyId
uint32_t LastUsedEpochKeyId
NextEpochKeyStartTime
uint32_t NextEpochKeyStartTime
Chức năng công cộng
Thông thoáng
virtual WEAVE_ERROR Clear( void )=0
DeleteGroupKey
virtual WEAVE_ERROR DeleteGroupKey( uint32_t keyId )=0
DeleteGroupKeysOfAType
virtual WEAVE_ERROR DeleteGroupKeysOfAType( uint32_t keyType )=0
DeriveApplicationKey
WEAVE_ERROR DeriveApplicationKey( uint32_t & appKeyId, const uint8_t *keySalt, uint8_t saltLen, const uint8_t *keyDiversifier, uint8_t diversifierLen, uint8_t *appKey, uint8_t keyBufSize, uint8_t keyLen, uint32_t & appGroupGlobalId )
Xuất phát từ khóa ứng dụng.
Ba loại phím ứng dụng được hỗ trợ: phím ứng dụng hiện tại, phím ứng dụng xoay và phím ứng dụng tĩnh. Khi khóa ứng dụng hiện tại được yêu cầu, chức năng sẽ tìm và sử dụng khóa kỷ nguyên hiện tại dựa trên thời gian hệ thống hiện tại và thông số thời gian bắt đầu của mỗi khóa kỷ nguyên.
Chi tiết | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||||||||||||
Giá trị trả lại |
|
EnumerateGroupKeys
virtual WEAVE_ERROR EnumerateGroupKeys( uint32_t keyType, uint32_t *keyIds, uint8_t keyIdsArraySize, uint8_t & keyCount )=0
GetCurrentAppKeyId
WEAVE_ERROR GetCurrentAppKeyId( uint32_t keyId, uint32_t & curKeyId )
Trả về ID khóa hiện tại.
Tìm khóa kỷ nguyên hiện tại dựa trên thời gian hệ thống hiện tại và tham số thời gian bắt đầu của từng khóa kỷ nguyên. Nếu hệ thống không có thời gian chính xác, hợp lệ thì ID khóa kỷ nguyên sử dụng gần đây nhất sẽ được trả về.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||
Giá trị trả lại |
|
GetCurrentUTCTime
virtual WEAVE_ERROR GetCurrentUTCTime( uint32_t & utcTime )
Nhận thời gian UTC của nền tảng hiện tại chỉ trong vài giây.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||
Giá trị trả lại |
|
GetGroupKey
WEAVE_ERROR GetGroupKey( uint32_t keyId, WeaveGroupKey & groupKey )
Nhận khóa nhóm ứng dụng.
Chức năng này dẫn xuất hoặc truy xuất các khóa nhóm ứng dụng. Các loại khóa được chức năng này hỗ trợ là: khóa bí mật, khóa gốc, khóa kỷ nguyên, khóa chính nhóm và khóa trung gian.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||
Giá trị trả lại |
|
RetrieveGroupKey
virtual WEAVE_ERROR RetrieveGroupKey( uint32_t keyId, WeaveGroupKey & key )=0
StoreGroupKey
virtual WEAVE_ERROR StoreGroupKey( const WeaveGroupKey & key )=0
Các chức năng được bảo vệ
Trong đó
void Init( void )
Khởi tạo thông số lưu trữ khóa nhóm cục bộ.
OnEpochKeysChange
void OnEpochKeysChange( void )
Trả về ID khóa hiện tại.
Đặt các biến thành viên được liên kết với khóa kỷ nguyên thành giá trị mặc định khi có bất kỳ thay đổi nào (xóa hoặc lưu trữ) xảy ra với tập hợp khóa kỷ nguyên ứng dụng. Lớp con có trách nhiệm triển khai các hàm StoreGroupKey (), DeleteGroupKey () và DeleteGroupKeysOfAType () để gọi phương thức này.
RetrieveLastUsedEpochKeyId
virtual WEAVE_ERROR RetrieveLastUsedEpochKeyId( void )=0
StoreLastUsedEpochKeyId
virtual WEAVE_ERROR StoreLastUsedEpochKeyId( void )=0