<commit_before>extern crate indy_crypto;
extern crate zeroize;

use self::zeroize::Zeroize;

use named_type::NamedType;


#[derive(Derivative)]
#[derivative(Debug)]
#[derive(Serialize, Deserialize, Clone, NamedType)]
pub struct Key {
    pub verkey: String,
    #[cfg(not(test))]
    #[derivative(Debug="ignore")]
    pub signkey: String,
    #[cfg(test)]
    pub signkey: String
}

impl Key {
    pub fn new(verkey: String, signkey: String) -> Key {
        Key {
            verkey,
            signkey
        }
    }
}

//Can't figure out why this macro can't be found in `cargo test` because
//if works for src/utils/crypto/randombytes/sodium
memzeroize!(Key, signkey);

//impl Zeroize for Key {
//    fn zeroize(&mut self) { self.signkey.zeroize(); }
//}
//
//impl Drop for Key {
//    fn drop(&mut self) {
//        self.signkey.zeroize();
//    }
//}

#[derive(Serialize, Deserialize, Debug)]
pub struct KeyInfo {
    pub seed: Option<String>,
    pub crypto_type: Option<String>
}

#[derive(Serialize, Deserialize, Debug, NamedType)]
pub struct KeyMetadata {
    pub value: String
}<commit_msg>Remove comment<commit_after>extern crate indy_crypto;
extern crate zeroize;

use self::zeroize::Zeroize;

use named_type::NamedType;


#[derive(Derivative)]
#[derivative(Debug)]
#[derive(Serialize, Deserialize, Clone, NamedType)]
pub struct Key {
    pub verkey: String,
    #[cfg(not(test))]
    #[derivative(Debug="ignore")]
    pub signkey: String,
    #[cfg(test)]
    pub signkey: String
}

impl Key {
    pub fn new(verkey: String, signkey: String) -> Key {
        Key {
            verkey,
            signkey
        }
    }
}

memzeroize!(Key, signkey);

#[derive(Serialize, Deserialize, Debug)]
pub struct KeyInfo {
    pub seed: Option<String>,
    pub crypto_type: Option<String>
}

#[derive(Serialize, Deserialize, Debug, NamedType)]
pub struct KeyMetadata {
    pub value: String
}
{'fraction_non_alphanumeric': 0.13796735123749343, 'fraction_numerical': 0.0, 'mean_word_length': 3.3280182232346243, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1762782', 'n_tokens_mistral': 634, 'n_tokens_neox': 649, 'n_words': 168}