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

弱密码签名:缺少必要加密步骤 #367

Open
QiAnXinCodeSafe opened this issue Sep 9, 2019 · 0 comments
Open

弱密码签名:缺少必要加密步骤 #367

QiAnXinCodeSafe opened this issue Sep 9, 2019 · 0 comments

Comments

@QiAnXinCodeSafe
Copy link

Signature signature = Signature.getInstance("SHA1with" + mKey.getAlgorithm());
signature.initSign(mKey);
mOutputJar.putNextEntry(new JarEntry("META-INF/CERT.SF"));
SignatureOutputStream out = new SignatureOutputStream(mOutputJar, signature);
writeSignatureFile(out);
// CERT.*
mOutputJar.putNextEntry(new JarEntry("META-INF/CERT." + mKey.getAlgorithm()));
writeSignatureBlock(signature, mCertificate, mKey);

在生成加密签名过程中,执行所有必需的步骤,确保不会削弱签名的强度。

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