nl:: Weave:: Profiles:: Security:: AppKeys:: GroupKeyStoreBase
Đây là một lớp trừu tượng.
#include <src/lib/profiles/security/WeaveApplicationKeys.h>
Định nghĩa về lớp kho khoá nhóm Weave.
Tóm tắt
Các hàm trong lớp này được gọi để quản lý khoá nhóm ứng dụng.
Tính kế thừa
Lớp học 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
|
Hàm công khai |
|
---|---|
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)
|
Trích xuất khoá ứ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ề mã khoá hiện tại.
|
GetCurrentUTCTime(uint32_t & utcTime)
|
virtual WEAVE_ERROR
Xem thời gian UTC của nền tảng hiện tại tính bằng giây.
|
GetGroupKey(uint32_t keyId, WeaveGroupKey & groupKey)
|
Nhận khoá nhóm ứng dụng.
|
RetrieveGroupKey(uint32_t keyId, WeaveGroupKey & key)=0
|
virtual WEAVE_ERROR
|
StoreGroupKey(const WeaveGroupKey & key)=0
|
virtual WEAVE_ERROR
|
Hàm được bảo vệ |
|
---|---|
Init(void)
|
void
Khởi chạy thông số kho khoá nhóm cục bộ.
|
OnEpochKeysChange(void)
|
void
Trả về mã khoá 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
Hàm công khai
Xóa
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 )
Trích xuất khoá ứng dụng.
Có 3 loại khoá ứng dụng được hỗ trợ: khoá ứng dụng hiện tại, khoá ứng dụng xoay và khoá ứng dụng tĩnh. Khi khoá ứng dụng hiện tại được yêu cầu, hàm sẽ tìm và sử dụng khoá thời gian bắt đầu của hệ thống 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 mỗi khoá thời gian bắt đầu của hệ thống.
Chi tiết | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tham số |
|
||||||||||||||||||
Giá trị trả về |
|
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ề mã khoá hiện tại.
Tìm khoá thời gian bắt đầu của hệ thống 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 khoá thời gian bắt đầu của hệ thống. Nếu hệ thống không có thời gian hợp lệ, chính xác, thì mã khoá thời gian bắt đầu của hệ thống được sử dụng gần đây nhất sẽ được trả về.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Tham số |
|
||||||||
Giá trị trả về |
|
GetCurrentUTCTime
virtual WEAVE_ERROR GetCurrentUTCTime( uint32_t & utcTime )
Xem thời gian theo giờ UTC của nền tảng hiện tại tính bằng giây.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Tham số |
|
||||||||
Giá trị trả về |
|
GetGroupKey
WEAVE_ERROR GetGroupKey( uint32_t keyId, WeaveGroupKey & groupKey )
Nhận khoá nhóm ứng dụng.
Hàm này lấy hoặc truy xuất khoá nhóm ứng dụng. Các loại khoá được hàm này hỗ trợ là: khoá bí mật, khoá gốc, khoá thời gian bắt đầu của hệ thống, khoá chính nhóm và khoá trung gian.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Tham số |
|
||||||||
Giá trị trả về |
|
RetrieveGroupKey
virtual WEAVE_ERROR RetrieveGroupKey( uint32_t keyId, WeaveGroupKey & key )=0
StoreGroupKey
virtual WEAVE_ERROR StoreGroupKey( const WeaveGroupKey & key )=0
Hàm được bảo vệ
Init
void Init( void )
Khởi động các thông số kho khoá nhóm cục bộ.
OnEpochKeysChange
void OnEpochKeysChange( void )
Trả về mã khoá hiện tại.
Đặt các biến thành phần được liên kết với khoá thời gian bắt đầu của hệ thống thành các giá trị mặc định khi có bất kỳ thay đổi nào (xoá hoặc lưu trữ) đối với tập hợp các khoá thời gian bắt đầu của ứng dụng. Trách nhiệm của lớp con triển khai các hàm StoreGroupKey(), DeleteGroupKey() và DeleteGroupKeysOfAType() để gọi phương thức này là.