Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cipher CLI example for CBC/CTR API #142

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

skmcgrail
Copy link
Member

@skmcgrail skmcgrail commented Jun 6, 2023

$ cargo run --example cipher -- --mode ctr encrypt "Hello World"
key: b331133eb742497c67ced9520c9a7de3
iv: 4e967c7b799e0670431888e2e959e154
ciphertext: 88bcbd8d1656d60de739c5

$ cargo run --example cipher -- --mode ctr --key b331133eb742497c67ced9520c9a7de3 decrypt --iv 4e967c7b799e0670431888e2e959e154 88bcbd8d1656d60de739c5
Hello World

$ cargo run --example cipher -- --mode cbc encrypt "Hello World"
key: 6489d8ce0c4facf18b872705a05d5ee4
iv: 5cd56fb752830ec2459889226c5431bd
ciphertext: 6311c14e8104730be124ce1e57e51fe3

$ cargo run --example cipher -- --mode cbc --key 6489d8ce0c4facf18b872705a05d5ee4 decrypt --iv 5cd56fb752830ec2459889226c5431bd 6311c14e8104730be124ce1e57e51fe3
Hello World

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and
the ISC license.

@skmcgrail skmcgrail requested a review from a team as a code owner June 6, 2023 19:17
@skmcgrail skmcgrail changed the base branch from main to aes-cbc-ctr June 6, 2023 19:17
@skmcgrail skmcgrail force-pushed the cipher-example branch 3 times, most recently from 0c61562 to 450aff1 Compare June 6, 2023 20:02
@skmcgrail skmcgrail requested a review from justsmth June 6, 2023 20:02
@skmcgrail skmcgrail merged commit 116fe29 into aws:aes-cbc-ctr Jun 6, 2023
@skmcgrail skmcgrail deleted the cipher-example branch June 6, 2023 21:06
justsmth pushed a commit to justsmth/aws-lc-rs that referenced this pull request Jun 6, 2023
* Add Cipher CLI to Examples

* Make Clippy Happy
skmcgrail added a commit that referenced this pull request Jun 7, 2023
* Add Cipher CLI to Examples

* Make Clippy Happy
justsmth pushed a commit to justsmth/aws-lc-rs that referenced this pull request Jun 15, 2023
* Add Cipher CLI to Examples

* Make Clippy Happy
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.

2 participants