Add Key::ToBinary, Key::FromBinary and more test cases for Key
This commit is contained in:
parent
83fad1ca53
commit
961fdd1d0b
@ -29,7 +29,7 @@ Key CryDevice::GetOrCreateRootKey(CryConfig *config) {
|
|||||||
string root_key = config->RootBlock();
|
string root_key = config->RootBlock();
|
||||||
if (root_key == "") {
|
if (root_key == "") {
|
||||||
auto key = CreateRootBlockAndReturnKey();
|
auto key = CreateRootBlockAndReturnKey();
|
||||||
config->SetRootBlock(key.AsString());
|
config->SetRootBlock(key.ToString());
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ const char *DirBlock::readAndAddNextChild(const char *pos, vector<string> *resul
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DirBlock::AddChild(const std::string &name, const Key &blockKey) {
|
void DirBlock::AddChild(const std::string &name, const Key &blockKey) {
|
||||||
string blockKeyStr = blockKey.AsString();
|
string blockKeyStr = blockKey.ToString();
|
||||||
|
|
||||||
char *insertPos = entriesEnd();
|
char *insertPos = entriesEnd();
|
||||||
assertEnoughSpaceLeft(insertPos, name.size() + 1 + blockKeyStr.size() + 1);
|
assertEnoughSpaceLeft(insertPos, name.size() + 1 + blockKeyStr.size() + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user