OpenSSL 3 · Converting, hashing and encrypting
Sign and verify a file
Create a signature with a private key, then check it with the public key.
openssl dgst -sha256 -sign private.key -out file.sig file.txt
openssl dgst -sha256 -verify public.key -signature file.sig file.txt
Official OpenSSL 3 documentation
More converting, hashing and encrypting commands
- Convert PEM to DER
- Bundle a key and certificate as PKCS#12
- Extract from a PKCS#12 bundle
- Hash a file
- Generate random bytes
- Encode and decode Base64
All converting, hashing and encrypting commands · OpenSSL 3 cheatsheet