maximumEncryptSize(with:)

Return the maximum amount of data in bytes this key can encrypt in a single operation when using the specified padding mode.

RSA.swift:726
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
func maximumEncryptSize(with padding: _RSA.Encryption.Padding) -> Int

Common values:

Key sizePaddingMax length
2048PKCS-OAEP214 bytes
3072PKCS-OAEP342 bytes
4096PKCS-OAEP470 bytes