Skip to content
Snippets Groups Projects
Select Git revision
  • f9ba0c901f95070a70bf0f741d49086781cbc812
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

save_revoke_document.py

Blame
  • utils_tests.py 1014 B
    # This file contains helpers for testing.
    from duniterpy.key import SigningKey
    
    mock_ud_value = 314
    
    pubkey_list = [
        {"pubkey": "9cwBBgXcSVMT74xiKYygX6FM5yTdwd3NABj1CfHbbAmp", "uid": ""},
        {"pubkey": "BUhLyJT17bzDVXW66xxfk1F7947vytmwJVadTaWb8sJS", "uid": ""},
        {"pubkey": "CtM5RZHopnSRAAoWNgTWrUhDEmspcCAxn6fuCEWDWudp", "uid": "riri"},
        {"pubkey": "HcRgKh4LwbQVYuAc3xAdCynYXpKoiPE6qdxCMa8JeHat", "uid": "fifi"},
        {"pubkey": "2sq4w8yYVDWNxVWZqGWWDriFf5z7dn7iLahDCvEEotuY", "uid": "loulou"},
    ]
    
    
    def insecure_key(pass_salt):
        """
        generate unsecure keys for testing purpose.
        pubkey(riri) = CtM5RZHopnSRAAoWNgTWrUhDEmspcCAxn6fuCEWDWudp
        pubkey(fifi) = HcRgKh4LwbQVYuAc3xAdCynYXpKoiPE6qdxCMa8JeHat
        pubkey(loulou) = 2sq4w8yYVDWNxVWZqGWWDriFf5z7dn7iLahDCvEEotuY
        pubkey(0) = 9cwBBgXcSVMT74xiKYygX6FM5yTdwd3NABj1CfHbbAmp
        pubkey(1) = BUhLyJT17bzDVXW66xxfk1F7947vytmwJVadTaWb8sJS
        """
        return SigningKey.from_credentials(pass_salt, pass_salt)
    
    
    key_fifi = insecure_key("fifi")