Skip to content

Comments

WIP: Symmetric crypto#193

Open
yilinwei wants to merge 27 commits intotypelevel:mainfrom
yilinwei:symmetric-crypto
Open

WIP: Symmetric crypto#193
yilinwei wants to merge 27 commits intotypelevel:mainfrom
yilinwei:symmetric-crypto

Conversation

@yilinwei
Copy link
Collaborator

Supersedes #115

Comment on lines 41 to 52
@js.native
private[bobcats] sealed trait AesCbcParams extends Algorithm

private[bobcats] object AesCbcParams {
def apply(iv: js.typedarray.ArrayBuffer): AesCbcParams =
js.Dynamic
.literal(
name = "AES-CBC",
iv = iv
)
.asInstanceOf[AesCbcParams]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@js.native
private[bobcats] sealed trait AesCbcParams extends Algorithm
private[bobcats] object AesCbcParams {
def apply(iv: js.typedarray.ArrayBuffer): AesCbcParams =
js.Dynamic
.literal(
name = "AES-CBC",
iv = iv
)
.asInstanceOf[AesCbcParams]
}
private[bobcats] sealed trait AesCbcParams extends js.Object with Algorithm {
val name: String
val iv: js.typedarray.ArrayBuffer
}
private[bobcats] object AesCbcParams {
def apply(_iv: js.typedarray.ArrayBuffer): AesCbcParams =
new AesCbcParams {
val name = "AES-CBC"
val iv = _iv
}
}

@yilinwei
Copy link
Collaborator Author

Some of the .rsp files are absolutely massive, I like the approach but I think that we'll just take a few of the test vectors. We're checking the plumbing after all; not the actual crypto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants