Made de/encrypt_string functions return length of dest in order to shrink byte buffer to correct size.