VerIDIdentity
@available(iOS 10.3, OSX 10.13, watchOS 3.3, macCatalyst 13.0, tvOS 10.3, *)
@objc
public class VerIDIdentity : NSObject
Represents an identity of a client using Ver-ID SDK
Since
3.0.0-
Digital certificate associated with this identity
Since
1.0.0Declaration
Swift
@objc public let certificate: SecCertificate
-
Common name from the identity’s digital certificate
Since
1.0.0Declaration
Swift
@objc public let commonName: String
-
Default algorithm used when creating digital signatures
Since
1.0.0Declaration
Swift
@objc public let defaultSignatureAlgorithm: SecKeyAlgorithm
-
Initializer
Since
2.0.0Declaration
Swift
@objc public convenience init(url: URL?, password: String?) throws
Parameters
url
URL of p12 file containing the digital certificate and private key used to construct the Ver-ID SDK identity
password
Password to unlock the p12 file
-
Initializer
Since
2.0.0Declaration
Swift
@objc public convenience init(url: URL) throws
Parameters
url
URL of p12 file containing the digital certificate and private key used to construct the Ver-ID SDK identity
-
Initializer
Since
2.0.0Declaration
Swift
@objc public convenience init(password: String) throws
Parameters
password
Password to unlock the p12 file
-
Initializer
Since
1.0.0Declaration
Swift
@objc public init(identity: SecIdentity) throws
Parameters
identity
Secure framework identity used to construct Ver-ID SDK identity
-
Sign a message
Since
1.0.0Declaration
Swift
@objc public func sign(_ message: Data, algorithm: SecKeyAlgorithm? = nil) throws -> Data
Parameters
message
Message to sign
algorithm
Algorithm to use when creating the signature (defaults to
SecKeyAlgorithm.rsaSignatureMessagePKCS1v15SHA256
)Return Value
Signature