pyca/pynacl — pull request #66 by warner (2014-06-20 22:17:09+00:00)
Title: fix argument order of low-level NaCl functions

This addresses #57 and should bring the low-level/raw API into agreement with other bindings and the underlying C functions. The new signatures are:

```
pk,sk = crypto_box_keypair()
k = crypto_box_beforenm(pk, sk)
ct = crypto_box_afternm(msg, nonce, k)
ct = crypto_box(msg, nonce, pk, sk)
msg = crypto_box_open_afternm(ct, nonce, k)
msg = crypto_box_open(ct, nonce, pk, sk)

ct = crypto_secretbox(msg, nonce, key)
msg = crypto_secretbox_open(ct, nonce, key)

pk,sk = crypto_sign_keypair()
pk,sk = crypto_sign_seed_keypair()
sm = crypto_sign(msg, sk)
msg = crypto_sign_open(sm, pk)
```

It adds a test for the low-level functions (including a handful of test vectors generated from external programs).