PTTimestampingConfiguration
@interface PTTimestampingConfiguration : NSObject
A class representing a set of options for timestamping a document.
-
Constructor.
Declaration
Objective-C
- (instancetype)initWithIn_url:(NSString *)in_url;
Swift
init!(in_url: String!)
Parameters
in_url
– a string representing a URL of a timestamp authority (TSA) to use during timestamping
-
Undocumented
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Setter to change the timestamp authority (TSA) URL to use during timestamping.
Declaration
Objective-C
- (void)SetTimestampAuthorityServerURL:(NSString *)in_url;
Swift
func setTimestampAuthorityServerURL(_ in_url: String!)
Parameters
in_url
– a string representing a URL of a timestamp authority.
-
Setter for a username to use during timestamping.
Declaration
Objective-C
- (void)SetTimestampAuthorityServerUsername:(NSString *)in_username;
Swift
func setTimestampAuthorityServerUsername(_ in_username: String!)
Parameters
in_username
– a string representing a username.
-
Setter for a password to use during timestamping.
Declaration
Objective-C
- (void)SetTimestampAuthorityServerPassword:(NSString *)in_password;
Swift
func setTimestampAuthorityServerPassword(_ in_password: String!)
Parameters
in_password
– a string representing a password.
-
Setter for whether to use a nonce (unique random number) during timestamping. This is on by default, and should be on whenever a timestamp authority supports it, because it helps prevent replay attacks.
Declaration
Objective-C
- (void)SetUseNonce:(BOOL)in_use_nonce;
Swift
func setUseNonce(_ in_use_nonce: Bool)
Parameters
in_use_nonce
– a boolean value representing whether or not to use a nonce
-
Tests a timestamping configuration for usability and reports any failures. This function does not throw on many common failures, unlike the real signing, thereby allowing early diagnosis of things like connectivity issues with timestamp authorities.
Declaration
Objective-C
- (PTTimestampingResult *)TestConfiguration:(PTVerificationOptions *)in_opts;
Swift
func test(_ in_opts: PTVerificationOptions!) -> PTTimestampingResult!
Parameters
in_opts
– a set of verification options to try to use
Return Value
A result object containing information about the status of the configuration test and any errors that occurred during it.