Java de encryption (AES / CBC) exception on Linux: Java Lang. SecurityException: JCE cannot authenticate the provider BC method

When using MapReduce for data cleaning, you need to decrypt the data. The encryption method is AES / CBC / pkcs7padding. Because Java does not support it, you need to add dependencies. The dependencies are:

Tool class for encryption and decryption, with code attached:

When Windows develops MapReduce program, the test is OK, but an error will be reported on the Linux Cluster:

Line 10 is added by me and determined by my own document content number;

Because it is a distributed cluster, each node must have the same environment!

After completing these configurations, re execute this task. Success!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>