What is the functionality of the seal() method ?
-
Creates a seal that binds a set of data and includes an expiration timestamp
-
Encodes the data
-
Hashes the data
-
Scrambles the data
The seal() method creates a cryptographic seal that binds data together with an expiration timestamp, providing tamper evidence and time-based validity. Unlike simple encoding, hashing, or scrambling, sealing provides integrity protection with temporal constraints.
The seal() method in ESAPI's Encryptor takes a piece of data and produces a tamper-evident 'seal' that bundles the data together with an expiration timestamp, so the receiving side can later verify both that the data hasn't been altered and that it hasn't expired. This is different from plain hashing (integrity only, no expiry) or simple encoding/scrambling, which don't carry any time-bound validity guarantee.