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

Set other hasher in config for PBKDF2 #41

Open
zmnv opened this issue Jun 8, 2020 · 0 comments
Open

Set other hasher in config for PBKDF2 #41

zmnv opened this issue Jun 8, 2020 · 0 comments

Comments

@zmnv
Copy link

zmnv commented Jun 8, 2020

Hello!
Is it possible to add configurable hasher prop for PBKDF2 in that module?


In CryptoJS there is a hasher prop in config.

const encryptionKey = CryptoJS.PBKDF2(
    pin,
    salt,
    {
        keySize: 4,
        hasher: CryptoJS.algo.SHA256, // <----------- about this
        iterations: 10000,
    },
);

In react-native-aes I see what that an adhoc solution and it uses SHA512:

PKCS5S2ParametersGenerator gen = new PKCS5S2ParametersGenerator(new SHA512Digest());
https://github.com/tectiv3/react-native-aes/blob/master/android/src/main/java/com/tectiv3/aes/RCTAes.java#L167
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