API change: pass the data after the context
This commit is contained in:
parent
c62029ee91
commit
90c8a2aa87
3 changed files with 15 additions and 15 deletions
|
@ -13,7 +13,7 @@ fn decrypt_coffio(ikml: &str, input: &str) {
|
|||
let key_ctx = KeyContext::from(KEY_CTX);
|
||||
let data_ctx = DataContext::from(DATA_CTX);
|
||||
let cb = CipherBox::new(&ikm);
|
||||
if let Err(e) = cb.decrypt(&key_ctx, input, &data_ctx) {
|
||||
if let Err(e) = cb.decrypt(&key_ctx, &data_ctx, input) {
|
||||
assert!(false, "{e}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ fn encrypt_coffio(ikml: &str, input: &str) {
|
|||
let key_ctx = KeyContext::from(KEY_CTX);
|
||||
let data_ctx = DataContext::from(DATA_CTX);
|
||||
let cb = CipherBox::new(&ikm);
|
||||
if let Err(e) = cb.encrypt(&key_ctx, input, &data_ctx) {
|
||||
if let Err(e) = cb.encrypt(&key_ctx, &data_ctx, input) {
|
||||
assert!(false, "{e}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue