Adding setKeyBuffer and getKeyBuffer. To be tested and documented, especially warned about their danger and in which case they can be used