This part should use the new `adhocracy.crypto` functions instead of reimplementing them