You could use sizeof(passphrase) - 1 if you make passphrase an array, as suggested above.