mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
rldp-http-proxy: use tonlib
- rldp-http-proxy used TONLib to resolve domains via DNS smartcontract - updated tonlib - bugfixes
This commit is contained in:
parent
1de39f5d7c
commit
493ae2410c
34 changed files with 816 additions and 153 deletions
|
|
@ -179,6 +179,11 @@ td::Result<KeyStorage::ExportedEncryptedKey> KeyStorage::export_encrypted_key(In
|
|||
return ExportedEncryptedKey{std::move(res.encrypted_data)};
|
||||
}
|
||||
|
||||
td::Result<KeyStorage::ExportedUnencryptedKey> KeyStorage::export_unencrypted_key(InputKey input_key) {
|
||||
TRY_RESULT(decrypted_key, export_decrypted_key(std::move(input_key)));
|
||||
return ExportedUnencryptedKey{decrypted_key.private_key.as_octet_string()};
|
||||
}
|
||||
|
||||
td::Result<KeyStorage::Key> KeyStorage::import_encrypted_key(td::Slice local_password, td::Slice key_password,
|
||||
ExportedEncryptedKey exported_key) {
|
||||
EncryptedKey encrypted_key{std::move(exported_key.data), td::Ed25519::PublicKey(td::SecureString()),
|
||||
|
|
@ -187,6 +192,14 @@ td::Result<KeyStorage::Key> KeyStorage::import_encrypted_key(td::Slice local_pas
|
|||
return save_key(std::move(decrypted_key), local_password);
|
||||
}
|
||||
|
||||
td::Result<KeyStorage::Key> KeyStorage::import_unencrypted_key(td::Slice local_password,
|
||||
ExportedUnencryptedKey exported_key) {
|
||||
RawDecryptedKey raw_key;
|
||||
raw_key.private_key = std::move(exported_key.data);
|
||||
DecryptedKey key(std::move(raw_key));
|
||||
return save_key(std::move(key), local_password);
|
||||
}
|
||||
|
||||
KeyStorage::PrivateKey KeyStorage::fake_private_key() {
|
||||
return PrivateKey{td::SecureString(32, 0)};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue