Conversation
djones6
reviewed
Mar 5, 2019
Contributor
djones6
left a comment
There was a problem hiding this comment.
Looks good, though this is a breaking change.
| public class ECPrivateKey { | ||
| /// The Elliptic curve this key was generated from. | ||
| public let curveId: String | ||
| public let curve: Curve |
Sources/CryptorECC/Curve.swift
Outdated
| } | ||
|
|
||
| /// A prime256v1 curve. | ||
| public static let prime256v1 = Curve.p256 |
Sources/CryptorECC/ECPublicKey.swift
Outdated
| public class ECPublicKey { | ||
| /// The Elliptic curve this key was generated from. | ||
| public let curveId: String | ||
| public let curve: Curve |
Contributor
Author
|
We have kept curveId so that this is no longer a breaking change. |
djones6
reviewed
Mar 5, 2019
| /// A String description of the curve this key was generated from. | ||
| public var curveId: String { | ||
| return curve.description | ||
| } |
Contributor
There was a problem hiding this comment.
Could we leave the curveId as a constant and set as before during the init?
djones6
approved these changes
Mar 5, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request replaces ECAlgorithm with Curve.
This is now a public struct that has a public representation of the curve for comparisons and checking on your key and all the internal variables that are used for encrypting and signing.
This was done to replace the "CurveID" String with an Struct version of enum limiting the comparable options.