QiaoyuanMaxDeng / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

Comments keep mentioning the .create method, but its name is .init #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For instance, in components/evkpdf.js:

         *     var kdf = CryptoJS.algo.EvpKDF.create();                                
         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });                  
         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
         */                                                                            
        init: function (cfg) {

The pattern can be seen in many other files.

Original issue reported on code.google.com by ddascale...@gmail.com on 14 Nov 2013 at 11:40

GoogleCodeExporter commented 9 years ago
"init" will initialize an existing instance object, but it doesn't create an 
instance object. "create", on the other hand, will create an instance object, 
then call "init" to initialize that instance, then return that instance.

Original comment by Jeff.Mott.OR on 14 Nov 2013 at 3:50

GoogleCodeExporter commented 9 years ago

Original comment by Jeff.Mott.OR on 19 Nov 2013 at 7:33