feat(core): normalize Ed25519 raw-key SPKI fingerprint to ed25519:hex (core/fingerprint-normalization)

This commit is contained in:
glm-5.2 committed 2026-06-28 21:40:45 +00:00
1 parent 3c7cfe5446
commit ea31200d17
2 files changed
+211 -4

No files matched your search

+4 -4
View File
@@ -178,10 +178,10 @@ mod tests {
let key = make_test_key();
let public = serde_json::to_string(&key.public_key).unwrap();
let private = serde_json::to_string(&vec![0xABu8; 32]).unwrap();
let json = format!(
r#"{{"key_type":"Ed25519","private_key":{private},"public_key":{public}}}"#
);
let result: DerivedKey = serde_json::from_str(&json).expect("non-redacted payload deserializes");
let json =
format!(r#"{{"key_type":"Ed25519","private_key":{private},"public_key":{public}}}"#);
let result: DerivedKey =
serde_json::from_str(&json).expect("non-redacted payload deserializes");
assert_eq!(result.key_type, KeyType::Ed25519);
assert_eq!(result.private_key, vec![0xABu8; 32]);
assert_eq!(result.public_key, key.public_key);