What's the problem with username being local ?  Surely not a problem with calling GetCurrentUserName; do you mean there's some problem with passing it to SavePublicKey ?