java.security.InvalidKeyException: Illegal key size or default parameters in android

后端 未结 5 1281
时光取名叫无心
时光取名叫无心 2020-12-08 01:40

I got the following error and I got a little stuck: Exception in thread \"main\"

java.security.InvalidKeyException: Illegal key size or default parameters
a         


        
5条回答
  •  天涯浪人
    2020-12-08 01:56

    private String cryptKey = "qkjll5@2md3gs5Q@FDFqf";

    By default Java supports only 128-bit encryption

    128bits == 16Bytes == 16 Chars.

    So cryptKey cannot exceed 16 characters.

    If you want to exceed more than 16 character you have to install Java Cryptography Extension (JCE) Unlimited Strength.

    Why 128bits?

提交回复
热议问题