darren_moffat@blog$ cat /dev/mem | grep /dev/urandom

« Encrypting files in... | Main | OpenSolaris User... »

20050415 Friday April 15, 2005

Wheres my md5sum ? 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.

    ( Apr 15 2005, 11:58:23 PM BST ) Permalink Comments [1]

    Trackback URL: http://blogs.sun.com/darren/entry/wheres_my_md5sum
    Comments:

    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.

    Posted by Shalon on July 21, 2005 at 04:28 AM BST #

    Post a Comment:

    Name:
    E-Mail:
    URL:

    Your Comment:

    HTML Syntax: NOT allowed

    Valid HTML! Valid CSS!


    follow darrenmoffat at http://twitter.com
    Get OpenSolaris  Use OpenOffice.org

    This is a personal weblog, I do not speak for my employer.