Multiple choice technology security

What is the signature of the seal method in the security API?

  1. java.lang.String seal(java.lang.String data,long timestamp) throws SecurityException

  2. java.lang.String seal(java.lang.String data,long timestamp) throws EncryptionException

  3. java.lang.String seal(java.lang.String data)

  4. java.lang.String seal(java.lang.String data) throws EncryptionException

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The seal method requires both data and timestamp parameters and throws SecurityException. Options C and D are missing the required timestamp parameter that seal operations need, while option B throws the wrong exception type.

AI explanation

The seal method is designed to produce a tamper-evident, time-limited token, so it needs both the data and an expiration timestamp as parameters, and it's declared to throw SecurityException when sealing fails. Signatures that drop the timestamp parameter don't support the token's built-in expiry, and the EncryptionException variants don't match how this API reports failures for its integrity operations.