Structureswift-crypto 3.8.0_CryptoExtras
Primitives
RSA.swift:466struct Primitives
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (13) members.
Type members
init<Bytes>(derRepresentation: Bytes
) throws Construct an RSA public key from a DER representation.
init(n: some ContiguousBytes, e: some ContiguousBytes
) throws Construct an RSA public key with the specified parameters.
init(pemRepresentation: String
) throws Construct an RSA public key from a PEM representation.
init<Bytes>(unsafeDERRepresentation: Bytes
) throws Construct an RSA public key from a DER representation.
init(unsafePEMRepresentation: String
) throws Construct an RSA public key from a PEM representation.
Instance members
var derRepresentation: Data
var keySizeInBits: Int
var pemRepresentation: String
var pkcs1DERRepresentation: Data
var pkcs1PEMRepresentation: String
func encrypt<D>(D, padding: _RSA.Encryption.Padding
) throws -> Data Encrypt a message with this key, using the specified padding mode.
func getKeyPrimitives(
) throws -> Primitives func maximumEncryptSize(with: _RSA.Encryption.Padding
) -> Int Return the maximum amount of data in bytes this key can encrypt in a single operation when using the specified padding mode.
Citizens in _CryptoExtras
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Sendable
Type members
Instance members
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.