It depends on the complexity of the chosen passcode. Apple allows 256 character in the passcode and the characters can be any of the 227 the user can access normally through the keyboard. The only limitation Apple places is that the user may not repeat the same character twice consecutively, for example, XOX is OK, but XXO would not be allowed. Simple numeric passcodes can be only four digits. . . Stupid to use, of course. . . of which there are only 9,999 total combinations, that could be broken before I finished typing the word "broken." But a really complex pass phrase would take as long as you say.
These technologies hash every pass phrase to 256 bits. Even if you only have a single character, it is hashed to 256 bits.
That’s why the crackers lea uses are essentially pass phrase guessers. They try hashing likely pass phrases using the hashing algorithm, rather than trying every 256 bit combination.