This program generates swarm.key file for IPFS Private Network feature.
go get -u github.com/coolkenshin/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen
ipfs-swarm-key-gen > ~/.ipfs/swarm.key
Change ~/.ipfs/
to different directory if you use custom IPFS_PATH.
MIT
Changes from random 32 bytes to 64 bytes, leading to a change from 64 to 128 base16-encoded string to make it safer
$ ~/go/bin/ipfs-swarm-key-gen
/key/swarm/psk/1.0.0/
/base16/
09e9234c128f58c473752f2e217efa6ad6a4fb11a97cd5e0d1b7215f092eb82c9b367c3549c98198645960f7ff969d5d3eca3622b44428483a338a587f97bf38