Utility function to convert a UserInfo to a KeyPair.
Available on UserInfo, provided by the AsKeyPair extension