Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #54 from mmoadeli/MAID-1058
Browse files Browse the repository at this point in the history
MAID-1029, MAID-1035, MAID-1041 and MAID-1058
  • Loading branch information
dirvine committed May 27, 2015
2 parents 5ee9152 + 3f171de commit fd8fcdd
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 720 deletions.
9 changes: 8 additions & 1 deletion src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,19 @@ macro_rules! convert_to_array {
///
/// Calculate and returns NameType using Public signing & encryption kets
///
pub fn name(public_keys: &(crypto::sign::PublicKey, crypto::asymmetricbox::PublicKey)) -> NameType {
pub fn name(public_keys: &(crypto::sign::PublicKey, crypto::asymmetricbox::PublicKey), type_tag: u64,
signature: &crypto::sign::Signature) -> NameType {
let combined_iter = (public_keys.0).0.into_iter().chain((public_keys.1).0.into_iter());
let mut combined: Vec<u8> = Vec::new();
for iter in combined_iter {
combined.push(*iter);
}
for i in type_tag.to_string().into_bytes().into_iter() {
combined.push(i);
}
for i in 1..crypto::sign::SIGNATUREBYTES {
combined.push(signature.0[i - 1]);
}
NameType(crypto::hash::sha512::hash(&combined).0)
}

Expand Down
178 changes: 0 additions & 178 deletions src/id/an_maid.rs

This file was deleted.

192 changes: 0 additions & 192 deletions src/id/an_mpid.rs

This file was deleted.

Loading

0 comments on commit fd8fcdd

Please sign in to comment.