jsencrypt
                                
                                
                                
                                    jsencrypt copied to clipboard
                            
                            
                            
                        var Base64导致的encrypt返回false.
`
Base64 = new base64();
encrypt = new JSEncrypt();
encrypt.setPublicKey(pk);
encrypt.encrypt(“hello1234”); //return false
`
Base64 = new base64();
encrypt = new JSEncrypt();
encrypt.setPublicKey(pk);
encrypt.encrypt(“hello1234”); // encrypt ok!
i solved by putting the public key in JSEncrypt instantiation instead
encrypt = new JSEncrypt(publickey);
问题解决了👍
i solved by putting the public key in JSEncrypt instantiation instead
encrypt = new JSEncrypt(publickey);
This method works, nice !