MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / sign_and_add

Method sign_and_add

atomic-identity/src/signing.rs:311–320  ·  view source on GitHub ↗

Sign and add to the set.

(
        &mut self,
        message: &[u8],
        identity: &Identity,
        keypair: &KeyPair,
        reason: Option<String>,
    )

Source from the content-addressed store, hash-verified

309
310 /// Sign and add to the set.
311 pub fn sign_and_add(
312 &mut self,
313 message: &[u8],
314 identity: &Identity,
315 keypair: &KeyPair,
316 reason: Option<String>,
317 ) {
318 let signature = SignatureInfo::sign(message, identity, keypair, reason);
319 self.add(signature);
320 }
321
322 /// Verify all signatures in the set.
323 pub fn verify_all(&self, message: &[u8]) -> Result<(), IdentityError> {

Callers 2

test_signature_setFunction · 0.80

Calls 1

addMethod · 0.45

Tested by 2

test_signature_setFunction · 0.64