semvec/pypi-packages huggingface dataset:
cryptools 0.0.6
easy-to-use implementations for ciphers, hashes, prngs, and attacks
Requires Python: >=3.4

# cryptools

Python crypto tools designed for ease of use and stability instead of guaranteed performance or cryptographic security.

## Installation
```shell
pip install cryptools
```

## Usage

### Hash

```python
from cryptools import *
sha1('adb')  # 'fa1143dea12bffbbc1aa99d5da2ec811d63b5127'
```

### PRNG

```python
from cryptools import *
# Using Mersenne Twister 19937 and default seed 5489
rand() # 0xD091BB5C
rand() # 0x22AE9EF6
seed(251)
rand() # 0xA33A7D59
rand() # 0x8631FB6B
```

### Cipher
```python
from cryptools import *
aes_ecb_encrypt('adb', 'cryptoolstestkey') # '4547e8e48086047f0e704728f86f1273'
aes_ecb_decrypt(b'EG\xe8\xe4\x80\x86\x04\x7f\x0epG(\xf8o\x12s', 'cryptoolstestkey') # b'adb'
```
qif2ofx 0.1.0
Convert from QIF to OXF
Requires Python: >=3.6

# qif2ofx

Convert credit card transactions in [Quicken Interchange format](https://en.wikipedia.org/wiki/Quicken_Interchange_Format) (QIF) to [Open Financial Exchange](https://www.ofx.net/) (OFX).
Use this if you can only comfortably import OFX in your finance tool of choice. For example, I use [beancount-import](https://github.com/jbms/beancount-import) (what an excellent tool!), but so far it only directly supports ingesting OFX. My bank decides to only distribute in QIF, so hence this (lazy) way of solving the problem.

The converter assumes you have credit card transactions in your QIF, and not whatever else QIF can be used to represent, because that's my only use-case so far.

## Install

The following provides the executable `qif2ofx` and the python library `qif2ofx`:

`pip install qif2ofx`

## Usage

OFX is a lot richer than QIF, from what I gathered from briefly looking at [the specification](https://www.ofx.net/downloads/OFX%202.2.pdf) (don't, if you want to preserve your sanity. It hurts my eyes. Why did they make all the tags in capital letters). QIF is basically a list of transactions, without real context, while OFX offers rich descriptions of all sorts of financial concepts. Hell, QIF doesn't even have a concept of currency. Hence to convert our QIF input to OFX we need to provide a bunch of metadata:


```
qif2ofx \ 
  # A glob expression, or path for that matter, of QIF files
  # we'd like to convert to OFX
  --glob "path/to/**/*.qif" \

  # The currency we'd like to set in our OFX file. 
  --currency GBP \

  # Again, QIF has no notion of accounts, OFX does. Tools handling
  # OFX expect an account identifier so they can reconcile with
  # the appropriate account in the money management tool.
  --acctid puppies
```

This is the bare minimum we need to generate a valid-ish OFX out of your QIF. You can set a few more options through the command line to control some details, see `qif2ofx --help` for more details.