![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/9/c4/9c4432ed-94b6-4f82-9d47-c9fb5f98b613/9c4432ed-94b6-4f82-9d47-c9fb5f98b613-bg37.png)
Chapter 2 Quick Start 33
Summary of the Six Steps
• For some algorithms, such as generating a public/private key pair, there is no
Update step.
Step 5: Final
Finalize the action initiated in Step 4. Again, the finalization depends on the
algorithm; for some algorithms, Final is replaced by Generate. For example:
• For an encryption or decryption algorithm, the Final step encrypts or decrypts the
final portion of the data. For some algorithms, this data may need special
handling, such as padding, that is different from the Update step.
• For a message digest, the digest action takes place during Final.
• For a random number generator, the Final (or Generate) step generates the
random bytes.
• For generating a public/private key pair, the key pair generation takes place in
the Generate step.
Step 6: Destroy
Free any memory allocated in the previous steps and overwrite any sensitive memory
with zeroes. The Destroy step is crucial to the security of an application.