diff --git a/src/ecaps2.rs b/src/ecaps2.rs index 352881f..36e55c2 100644 --- a/src/ecaps2.rs +++ b/src/ecaps2.rs @@ -28,6 +28,15 @@ generate_element!( impl PresencePayload for ECaps2 {} +impl ECaps2 { + /// Create an ECaps2 element from a list of hashes. + pub fn new(hashes: Vec) -> ECaps2 { + ECaps2 { + hashes, + } + } +} + fn compute_item(field: &str) -> Vec { let mut bytes = field.as_bytes().to_vec(); bytes.push(0x1f);