def _make_padding(mod_length):
    """
    Creates a padding string that when concatenated with the SHA-1 checksum
    results in a EMSA-PKCS1-v1_5 encoded string as specified in RFC3447
    section 9.2
    """

    # Constant for SHA-1 taken from RFC3447 page 42 note 1
    PS = "\x30\x21\x30\x09\x06\x05\x2b\x0e\x03\x02\x1a\x05\x00\x04\x14"
    all_ff = "\xff" * (mod_length - len(PS) - 23)
    return "\x00\x01" + all_ff + "\x00" + PS