def test_deterministic_generate_k_A_2_5(self):
        h = hashlib.sha256(b'sample').digest()
        val = intbytes.from_bytes(h)
        self.assertEqual(val, 0xAF2BDBE1AA9B6EC1E2ADE1D694F41FC71A831D0268E9891562113D8A62ADD1BF)
        generator_order = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D
        secret_exponent = 0xF220266E1105BFE3083E03EC7A3A654651F45E37167E88600BF257C1
        k = deterministic_generate_k(generator_order, secret_exponent, val)
        self.assertEqual(k, 0xAD3029E0278F80643DE33917CE6908C70A8FF50A411F06E41DEDFCDC)
The example in https://tools.ietf.org/html/rfc6979#appendix-A.2.5
dataset/ETHPy150Open richardkiss/pycoin/tests/ecdsa_test.py/ECDSATestCase.test_deterministic_generate_k_A_2_5