change ECB mode to CTR mode
fix initCtr method
bug fixes