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

is there any limit for encode time matching decode #83

Open
rangercyh opened this issue Jun 27, 2019 · 0 comments
Open

is there any limit for encode time matching decode #83

rangercyh opened this issue Jun 27, 2019 · 0 comments

Comments

@rangercyh
Copy link

I have found everytime I want to encode something I must create a aes.ModeOfOperation, such as

let aesCbc = new aes.ModeOfOperation.cbc(u_key, u_iv)
let a = aesCbc.encrypt(xxx)
let aesCbc2 = new aes.ModeOfOperation.cbc(u_key, u_iv)
aesCbc2 .decrypt(a)

when I try this some decrypt failed?

let aesCbc = new aes.ModeOfOperation.cbc(u_key, u_iv)
let a = aesCbc.encrypt(xxx)
// let aesCbc2 = new aes.ModeOfOperation.cbc(u_key, u_iv)
aesCbc .decrypt(a)

or when I try this, some decrypt failed strange too.

let aesCbc_en = new aes.ModeOfOperation.cbc(u_key, u_iv)
let aesCbc_de = new aes.ModeOfOperation.cbc(u_key, u_iv)

let a = aesCbc_en.encrypt(xxx)
let a2 = aesCbc_en.encrypt(xxx)
let a3 = aesCbc_en.encrypt(xxx)

aesCbc_de.decrypt(a)
aesCbc_de.decrypt(a3)
aesCbc_de.decrypt(a2)

Is I missing something?

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

No branches or pull requests

1 participant