<commit_before>
import os

from rtxp.core import hashes
from rtxp.core import utils

import dsa


_HASH_TX_SIGN = 'STX\0'
_HASH_TX_SIGN_TESTNET = 'stx\0'


def _get_signing_hash(blob, test=False):
	prefix = _HASH_TX_SIGN_TESTNET if test else _HASH_TX_SIGN
	return hashes.sha512half(prefix + blob)


def _sign_blob(tx_blob, seed, test=False):
	signing_hash = _get_signing_hash(tx_blob)
	return dsa.sign(signing_hash, seed)


class Signer(object):

	def __init__(self, address, serializer):
		self.address = address
		self.serializer = serializer

	def generate_keypair(self):
		""" Generate an address and a secret key """

		seed = os.urandom(32)
		public_key = dsa.get_public_key(seed)
		account = hashes.hash160(public_key)<commit_msg>- Fixed missing param<commit_after>
import os

from rtxp.core import hashes
from rtxp.core import utils

import dsa


_HASH_TX_SIGN = 'STX\0'
_HASH_TX_SIGN_TESTNET = 'stx\0'


def _get_signing_hash(blob, test=False):
	prefix = _HASH_TX_SIGN_TESTNET if test else _HASH_TX_SIGN
	return hashes.sha512half(prefix + blob)


def _sign_blob(tx_blob, seed, test=False):
	signing_hash = _get_signing_hash(tx_blob, test)
	return dsa.sign(signing_hash, seed)


class Signer(object):

	def __init__(self, address, serializer):
		self.address = address
		self.serializer = serializer

	def generate_keypair(self):
		""" Generate an address and a secret key """

		seed = os.urandom(32)
		public_key = dsa.get_public_key(seed)
		account = hashes.hash160(public_key)
{'fraction_non_alphanumeric': 0.09408602150537634, 'fraction_numerical': 0.013440860215053764, 'mean_word_length': 5.256302521008403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3912194', 'n_tokens_mistral': 599, 'n_tokens_neox': 567, 'n_words': 129}