mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-02-17 03:33:08 +00:00
* Update config and crate naming
- Updated configs to the lates main repo configs.
- Updated all main repo crate namings to be same as the main repo.
- Added `create_dir_all` to `pub(crate) fn create_tempdir(custom_work_dir: Option<PathBuf>) -> std::io::Result<TempDir> {`.
- Wired in optional `persist_dir` when using the local deployer.
- Update `time` vulnerability
**Note:** Unsure about the `service_params` mapping in `pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings {`
15 lines
468 B
Rust
15 lines
468 B
Rust
use lb_groth16::fr_to_bytes;
|
|
use lb_key_management_system_service::{
|
|
backend::preload::KeyId,
|
|
keys::{Key, secured_key::SecuredKey as _},
|
|
};
|
|
|
|
#[must_use]
|
|
pub fn key_id_for_preload_backend(key: &Key) -> KeyId {
|
|
let key_id_bytes = match key {
|
|
Key::Ed25519(ed25519_secret_key) => ed25519_secret_key.as_public_key().to_bytes(),
|
|
Key::Zk(zk_secret_key) => fr_to_bytes(zk_secret_key.as_public_key().as_fr()),
|
|
};
|
|
hex::encode(key_id_bytes)
|
|
}
|