PublicKey constructor can receive a key resource