X

News, tips, partners, and perspectives for the Oracle Solaris operating system

Wheres my md5sum ?

Darren Moffat
Senior Software Architect
There are various commands available for generating the digest
of a file on Solaris 10:

  • /usr/bin/digest - Solaris command, similar to FreeBSD's digest(1)
    islay$ /usr/bin/digest -a md5 /lib/libc.so.1
    92452f571c9cb37f96ab8e1e96af2ff9
    islay$ /usr/bin/digest -v -a md5 /lib/libc.so.1
    md5 (/lib/libc.so.1) = 92452f571c9cb37f96ab8e1e96af2ff9


  • /opt/sfw/bin/gmd5sum - the GNU md5sum(1) program
    islay$ /opt/sfw/bin/gmd5sum /lib/libc.so.1
    92452f571c9cb37f96ab8e1e96af2ff9 /lib/libc.so.1


  • /usr/sfw/bin/openssl dgst - OpenSSL digest option for openssl(1).
    islay$ /usr/sfw/bin/openssl dgst -md5 /lib/libc.so.1
    MD5(/lib/libc.so.1)= 92452f571c9cb37f96ab8e1e96af2ff9


  • The digest command uses libpkcs11(3lib)
    on Solaris and will thus use pkcs11_softtoken(5) by default or a hardware accelerator such as the SCA-1000 or SCA-4000
    card if it is available.


    The digest(1) command can also be invoked as mac(1), in this mode it takes a key (either from a file or from user input),
    and instead of a digest produces a message authentication code (HMAC). digest(1)/mac(1) currently supports MD5 and SHA-1
    hashes/hmacs and will be extended to support SHA-{256,384,512} when support for PKCS#11 v2.20 is added to a future
    Solaris release.

    Join the discussion

    Comments ( 1 )
    • Shalon Wednesday, July 20, 2005
      I always use cksum. For the first time, I know that we may
      get md5 easily on solairs by typing 'digest', it's so helpful,
      thank you very much for your info.
    Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.