Protocolswift-crypto 3.12.2Crypto
KEMPrivateKey
A Key Encapsulation Mechanism’s Private Key
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
protocol KEMPrivateKey
Browse conforming typesA Key Encapsulation Mechanism’s Private Key
protocol KEMPrivateKey
import Crypto
A cryptography library for Swift.
associatedtype PublicKey : KEMPublicKey
static func generate() throws -> Self
Generate a new random Private Key
var publicKey: PublicKey { get }
Returns the associated public key
func decapsulate(_ encapsulated: Data) throws -> SymmetricKey
Decapsulates the encapsulated shared secret