How does mvn --encrypt-master-password <password> work?

≡放荡痞女 提交于 2019-11-30 20:07:51

The encryption mechanism is not in the maven codebase per se. It is located on a library called plexus-cipher. It is always on the maven distribution. Mine is on lib/plexus-cipher-1.7.jar being 3.0.5 the maven version.

The actual cipher is AES/CBC/PKCS5Padding. The key for the cipher and IV for the block chaining are derived iterating SHA-256-ing over the provided password (encoded as UTF-8) concatenated with a JVM-configuration-specific (usually SHA1PRNG) 64-bit random salt once or twice.

No big surprises here. It seems to be on the same format every other soul is using nowadays.

The gory details can be found reading the source on the GitHub project page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!