Renamed KeyGenerator into KeyHandler. Added base64 encoding.