B<openssl> B<dgst>|I<digest>
[B<-I<digest>>]
+[B<-list>]
[B<-help>]
[B<-c>]
[B<-d>]
[B<-debug>]
-[B<-list>]
[B<-hex>]
[B<-binary>]
[B<-xoflen> I<length>]
algorithm to be used.
The default digest is B<sha256>.
A supported I<digest> name may also be used as the sub-command name.
-To see the list of supported algorithms, use C<openssl list -digest-commands>
+To see the list of supported algorithms, use C<openssl list -digest-algorithms>
=head1 OPTIONS
=item B<-I<digest>>
-Specifies name of a supported digest to be used. To see the list of
-supported digests, use the command C<list --digest-commands>.
+Specifies name of a supported digest to be used. See option B<-list> below :
+
+=item B<-list>
+
+Prints out a list of supported message digests.
=item B<-c>
Print out BIO debugging information.
-=item B<-list>
-
-Prints out a list of supported message digests.
-
=item B<-hex>
Digest is to be output as a hex dump. This is the default case for a "normal"
=head1 EXAMPLES
To create a hex-encoded message digest of a file:
+
openssl dgst -md5 -hex file.txt
+ or
+ openssl md5 file.txt
To sign a file using SHA-256 with binary file output:
+
openssl dgst -sha256 -sign privatekey.pem -out signature.sign file.txt
+ or
+ openssl sha256 -sign privatekey.pem -out signature.sign file.txt
To verify a signature:
+
openssl dgst -sha256 -verify publickey.pem \
-signature signature.sign \
file.txt
The digest mechanisms that are available will depend on the options
used when building OpenSSL.
-The C<openssl list -digest-commands> command can be used to list them.
+The C<openssl list -digest-algorithms> command can be used to list them.
New or agile applications should use probably use SHA-256. Other digests,
particularly SHA-1 and MD5, are still widely used for interoperating