From the sixth book of St. Alphonsus's Moral Theology:
"Baptism, therefore, coming from a Greek word that means washing or
immersion in water, is distinguished into Baptism of water, of spirit, and
of blood. ... But Baptism of spirit is perfect conversion to God by
contrition or love of God above all things accompanied by an explicit or
implicit desire for true Baptism of water, the place of which it takes as to
the remission of guilt, but not as to the impression of the character or as
to the removal of all debt of punishment. It is called 'of spirit' because
it takes place by the impulse of the Holy Spirit. Now it is de fide that men
are also saved by Baptism of spirit, by virtue of the Canon Apostolicam, 'de
presbytero non baptizato' and of the Council of Trent, session 6, Chapter 4
where it is said that no one can be saved 'without the laver of regeneration
or the desire."
We see here that St. Alphonsus agrees with St. Thomas that baptism of desire need not come about through an explicit desire for baptism, but an implicit desire is also sufficient for this.
St. Alphonsus also asks the question whether one needs explicit faith in the incarnation in order to be saved, but does not come firmly down on a given side. He holds that the opinion which says that explicit faith is required is more probable, but that the other position which holds that one may believe implicitly is also quite probable.