Language:
كتاب النكاح
67  
Wedlock, Marriage (Nikaah)
(41)
Chapter: The ruler is regarded as a guardian
(40)
بَابُ السُّلْطَانُ وَلِيٌّ بِقَوْلِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «زَوَّجْنَاكَهَا بِمَا مَعَكَ مِنَ الْقُرْآنِ»
Sahih al-Bukhari 5135

Narrated Sahl bin Sa`d:

A woman came to Allah's Messenger (ﷺ) and said, "I present myself (to you) (for marriage). She stayed for a long while, then a man said, "If you are not in need of her then marry her to me." The Prophet (ﷺ) said, "Have you got anything m order to pay her Mahr?" He said, "I have nothing with me except my Izar (waist sheet)." The Prophet (ﷺ) said, "If you give her your Izar, you will have no Izar to wear, (so go) and search for something. He said, "I could not find anything." The Prophet (ﷺ) said, "Try (to find something), even if it were an iron ring But he was not able to find (even that) The Prophet (ﷺ) said (to him). "Do you memorize something of the Qur'an?" "Yes. ' he said, "such Sura and such Sura," naming those Suras The Prophet (ﷺ) said, "We have married her to you for what you know of the Qur'an (by heart).

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، أَخْبَرَنَا مَالِكٌ، عَنْ أَبِي حَازِمٍ، عَنْ سَهْلِ بْنِ سَعْدٍ، قَالَ جَاءَتِ امْرَأَةٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَتْ إِنِّي وَهَبْتُ مِنْ نَفْسِي‏.‏ فَقَامَتْ طَوِيلاً فَقَالَ رَجُلٌ زَوِّجْنِيهَا، إِنْ لَمْ تَكُنْ لَكَ بِهَا حَاجَةٌ‏.‏ قَالَ ‏"‏ هَلْ عِنْدَكَ مِنْ شَىْءٍ تُصْدِقُهَا ‏"‏‏.‏ قَالَ مَا عِنْدِي إِلاَّ إِزَارِي‏.‏ فَقَالَ ‏"‏ إِنْ أَعْطَيْتَهَا إِيَّاهُ جَلَسْتَ لاَ إِزَارَ لَكَ، فَالْتَمِسْ شَيْئًا ‏"‏‏.‏ فَقَالَ مَا أَجِدُ شَيْئًا‏.‏ فَقَالَ ‏"‏ الْتَمِسْ وَلَوْ خَاتَمًا مِنْ حَدِيدِ ‏"‏‏.‏ فَلَمْ يَجِدْ‏.‏ فَقَالَ ‏"‏ أَمَعَكَ مِنَ الْقُرْآنِ شَىْءٌ ‏"‏‏.‏ قَالَ نَعَمْ سُورَةُ كَذَا وَسُورَةُ كَذَا لِسُوَرٍ سَمَّاهَا‏.‏ فَقَالَ ‏"‏ زَوَّجْنَاكَهَا بِمَا مَعَكَ مِنَ الْقُرْآنِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 5135
In-book reference : Book 67, Hadith 71
USC-MSA web (English) reference : Vol. 7, Book 62, Hadith 66
  (deprecated numbering scheme)