예제 #1
0
 def test_BrainKey_sequences(self):
     b = BrainKey("COLORER BICORN KASBEKE FAERIE LOCHIA GOMUTI SOVKHOZ Y GERMAL AUNTIE PERFUMY TIME FEATURE GANGAN CELEMIN MATZO")
     keys = ["5Hsbn6kXio4bb7eW5bX7kTp2sdkmbzP8kGWoau46Cf7en7T1RRE",
             "5K9MHEyiSye5iFL2srZu3ZVjzAZjcQxUgUvuttcVrymovFbU4cc",
             "5JBXhzDWQdYPAzRxxuGtzqM7ULLKPK7GZmktHTyF9foGGfbtDLT",
             "5Kbbfbs6DmJFNddWiP1XZfDKwhm5dkn9KX5AENQfQke2RYBBDcz",
             "5JUqLwgxn8f7myNz4gDwo5e77HZgopHMDHv4icNVww9Rxu1GDG5",
             "5JNBVj5QVh86N8MUUwY3EVUmsZwChZftxnuJx22DzEtHWC4rmvK",
             "5JdvczYtxPPjQdXMki1tpNvuSbvPMxJG5y4ndEAuQsC5RYMQXuC",
             "5HsUSesU2YB4EA3dmpGtHh8aPAwEdkdhidG8hcU2Nd2tETKk85t",
             "5JpveiQd1mt91APyQwvsCdAXWJ7uag3JmhtSxpGienic8vv1k2W",
             "5KDGhQUqQmwcGQ9tegimSyyT4vmH8h2fMzoNe1MT9bEGvRvR6kD"]
     for i in keys:
         p = b.next_sequence().get_private()
         self.assertEqual(str(p), i)
예제 #2
0
class Account(Benchmark):
    def setup(self):
        self.b = BrainKey(
            "COLORER BICORN KASBEKE FAERIE LOCHIA GOMUTI SOVKHOZ Y GERMAL AUNTIE PERFUMY TIME FEATURE GANGAN CELEMIN MATZO"
        )

    def time_B85hexgetb58_btc(self):
        format(
            Base58(
                "02b52e04a0acfe611a4b6963462aca94b6ae02b24e321eda86507661901adb49"
            ), "WIF")

    def time_B85hexgetb58(self):
        format(
            Base58(
                "02b52e04a0acfe611a4b6963462aca94b6ae02b24e321eda86507661901adb49"
            ), "BTS")

    def time_Address(self):
        format(Address("BTSFN9r6VYzBK8EKtMewfNbfiGCr56pHDBFi", prefix="BTS"),
               "BTS")

    def time_PubKey(self):
        format(
            PublicKey("BTS6UtYWWs3rkZGV8JA86qrgkG6tyFksgECefKE1MiH4HkLD8PFGL",
                      prefix="BTS").address, "BTS")

    def time_btsprivkey(self):
        format(
            PrivateKey(
                "5HqUkGuo62BfcJU5vNhTXKJRXuUi9QSE6jp8C3uBJ2BVHtB8WSd").address,
            "BTS")

    def time_btcprivkey(self):
        format(
            PrivateKey("5HvVz6XMx84aC5KaaBbwYrRLvWE46cH6zVnv4827SBPLorg76oq").
            uncompressed.address, "BTC")

    def time_PublicKey(self):
        str(
            PublicKey("BTS6UtYWWs3rkZGV8JA86qrgkG6tyFksgECefKE1MiH4HkLD8PFGL",
                      prefix="BTS"))

    def time_Privatekey(self):
        str(PrivateKey("5HvVz6XMx84aC5KaaBbwYrRLvWE46cH6zVnv4827SBPLorg76oq"))

    def time_BrainKey(self):
        str(
            BrainKey(
                "COLORER BICORN KASBEKE FAERIE LOCHIA GOMUTI SOVKHOZ Y GERMAL AUNTIE PERFUMY TIME FEATURE GANGAN CELEMIN MATZO"
            ).get_private())

    def time_BrainKey_normalize(self):
        BrainKey(
            "COLORER BICORN KASBEKE FAERIE LOCHIA GOMUTI SOVKHOZ Y GERMAL AUNTIE PERFUMY TIME FEATURE GANGAN CELEMIN MATZO"
        ).get_brainkey()

    def time_BrainKey_sequences(self):
        p = self.b.next_sequence().get_private()

    def time_PasswordKey(self):
        pwd = "Aang7foN3oz1Ungai2qua5toh3map8ladei1eem2ohsh2shuo8aeji9Thoseo7ah"
        format(PasswordKey("xeroc", pwd, "posting").get_public(), "STM")