ECPublicKey
public class ECPublicKey : CustomStringConvertible
An Elliptic Curve public key
-
Creates a public key from its DER encoding
Throws
An exception if the DER encoding is wrongDeclaration
Swift
public convenience init(der: Bytes) throwsParameters
derThe DER encoding of the key
-
Creates a public key from its PEM encoding
Throws
An exception if the PEM encoding is wrongDeclaration
Swift
public convenience init(pem: String) throwsParameters
pemThe PEM encoding of the key
-
The ASN1 encoding of self
Declaration
Swift
public var asn1: ASN1 { get } -
The PEM encoding of self
Declaration
Swift
public var pem: String { get } -
A textual representation of the ASN1 encoding of self
Declaration
Swift
public var description: String { get }
-
Verifies a signature with ECDSA
Declaration
Swift
public func verify(signature: ECSignature, msg: Bytes, bw: Int? = nil) -> BoolParameters
signatureThe signature to verify
msgThe message to verify signature for
bwOptional bitwidth used to select the proper message digest. By default the domain field size is used
Return Value
true iff the signature is verified
-
Verifies a signature with ECDSA
Declaration
Swift
public func verify(signature: ECSignature, msg: Data, bw: Int? = nil) -> BoolParameters
signatureThe signature to verify
msgThe message to verify signature for
bwOptional bitwidth used to select the proper message digest. By default the domain field size is used
Return Value
true iff the signature is verified
ECPublicKey Class Reference