does ruby-aes use padding by default?
问题 I am using the following in a RoR project: somepass =Aes.encrypt_buffer(128, 'ECB', some_cypher_key, nil, pain_string) Does using this lib and method ECB use padding by default or not? What I am ultimately trying to do is have a RoR app and a Java app be able to create the same encrypted string out of the same simple string. In Java code I use: cipher = Cipher.getInstance("AES/ECB/PKCS5Padding", "SunJCE"); These two lines of code do not create the same encrypted key. 回答1: Aes.encrypt_buffer