signature(for:)

    Generates an RSA signature with the given key using the default padding.

    RSA.swift:361
    func signature<D>(for data: D) throws -> _RSA.Signing.RSASignature where D : DataProtocol

    Parameters

    data

    The data to sign.

    Returns

    The RSA Signature.

    Throws

    If there is a failure producing the signature.

    SHA256 is used as the hash function. The default padding is PSS using MGF1 with SHA256 and a 32-byte salt.

    Other members in extension

    Type members

    Show implementation details (1)

    Hide implementation details

    Instance members