PublicKeyRSA

public final class PublicKeyRSA : PublicKey

Class that describes a public RSA key object. Inherits from PublicKey.

  • Returns the modulus.

    Declaration

    Swift

    public func getModulus(completionHandler: @escaping (_ modulus: Data?, _ error: NSError?) -> Void)

    Parameters

    completionHandler

    The completion handler block to be called as soon as the modulus is retrieved. It takes the following parameters:

    • modulus Data?: The modulus.
    • error NSError?: nil if the modulus is retrieved successfully; otherwise an error encapsulates the reason of failure.

    Note

    The completion handler is executed on the same type of DispatchQueue as in the calling code.

  • Returns the public exponent.

    Declaration

    Swift

    public func getPublicExponent(completionHandler: @escaping (_ publicExponent: Data?, _ error: NSError?) -> Void)

    Parameters

    completionHandler

    The completion handler block to be called as soon as the public exponent is retrieved. It takes the following parameters:

    • publicExponent Data?: The public exponent.
    • error NSError?: nil if the modulus is retrieved successfully; otherwise an error encapsulates the reason of failure.

    Note

    The completion handler is executed on the same type of DispatchQueue as in the calling code.