added function to get length of pad, further development of cbc mode