The best practice is to comply with the [Web3 Secret Storage Definition.](https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition)  This will allow your private key to be easily imported into clients such as Geth and cpp-ethereum (eth).  The definition encodes to a JSON file (unlike a Base58Check-encoded printable string as in BIP38) and includes test vectors.