Mcookie, pkg -l to generate random sequence

I am setting this thread to this bsd forum, though it may fit into bash. But as using bsd and the terminal, I would like to generate a random sequence of alphanumerical digits, such as I use to do so on linux by typing just

mcookie

this one gives me a pretty random password, but it does not on bsd 10.1.
Does someone have any idea without creating that via

tr -dc a-z1-9 < /dev/urandom

or other similar constructions even more complicated?
by typing

pkg -l

the list of commands is pretty short. Hitting twice the tab-space as root does not help either as is lists all in linux.
Any hints? Thanks in advance.

So I have been trying the following command without success, because md5sum and sha256sum or higher are not present on my bsd, for either root or user.

date  | m5sum

as well with the other ones.
While typing the following longer command (I read the manual about random and urandom)

cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n1

all I get as an answer is

tr: Illegal byte sequence

Someone may knows what is wrong with this lack of commands? And is there a shorter way to generate such a random password? Thanks in advance.

Solved, or lets say, for this particular case, solved, because any attempt with tr went to illegal byte sequence, so the following line did it.

TMPFILE=`mktemp tmp.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` &&  echo $TMPFILE