אמר רבי חמא ברבי חנינא בהכר בישר לאביו בהכר בישרוהו, בהכר בישר הכר נא הכתונת בנך היא, בהכר בישרוהו, הכר נא למי... ויכר יהודה ויאמר צדקה ממני, היינו דאמר רב חנין בר ביזנא אמר רבי שמעון חסידא יוסף שקדש שם שמים בסתר זכה והוסיפו לו אות אחת משמו של הקב"ה, דכתיב עדות ביהוסף שמו, יהודה שקדש שם שמים בפרהסיא, זכה ונקרא כולו על שמו של הקב"ה, כיון שהודה ואמר צדקה ממני, יצתה בת קול ואמרה, אתה הצלת תמר ושני בניה מן האור, חייך שאני מציל בזכותך ג' מבניך מן האור, חנניה מישאל ועזריה...
״וַיַּכֵּר יְהוּדָה וַיֹּאמֶר צָדְקָה מִמֶּנִּי״. הַיְינוּ דְּאָמַר רַב חָנִין בַּר בִּיזְנָא אָמַר רַבִּי שִׁמְעוֹן חֲסִידָא: יוֹסֵף שֶׁקִּדֵּשׁ שֵׁם שָׁמַיִם בַּסֵּתֶר — זָכָה וְהוֹסִיפוּ לוֹ אוֹת אַחַת מִשְּׁמוֹ שֶׁל הַקָּדוֹשׁ בָּרוּךְ הוּא, דִּכְתִיב: ״עֵדוּת בִּיהוֹסֵף שָׂמוֹ״. יְהוּדָה שֶׁקִּדֵּשׁ שֵׁם שָׁמַיִם בְּפַרְהֶסְיָא — זָכָה וְנִקְרָא כּוּלּוֹ עַל שְׁמוֹ שֶׁל הַקָּדוֹשׁ בָּרוּךְ הוּא. כֵּיוָן שֶׁהוֹדָה וְאָמַר ״צָדְקָה מִמֶּנִּי״, יָצְתָה בַּת קוֹל וְאָמְרָה: אַתָּה הִצַּלְתָּ תָּמָר וּשְׁנֵי בָּנֶיהָ מִן הָאוּר — חַיֶּיךָ שֶׁאֲנִי מַצִּיל בִּזְכוּתְךָ שְׁלֹשָׁה מִבָּנֶיךָ מִן הָאוּר. מַאן נִינְהוּ — חֲנַנְיָה מִישָׁאֵל וַעֲזַרְיָה.
The verse states: “And Judah acknowledged them, and said: She is more righteous than I; forasmuch as I gave her not to Shelah my son” (Genesis 38:26). This is the same as Rav Ḥanin bar Bizna says that Rabbi Shimon Ḥasida says: Joseph, who sanctified the name of Heaven in private by not committing adultery with the wife of Potiphar, merited that one letter from the name of the Holy One, Blessed be He, was added to his name, as it is written: “He appointed it in Joseph [bihosef ] for a testimony in his name, when He went forth against the land of Egypt” (Psalms 81:6). In this verse the name Joseph is written with an additional letter heh, found in the ineffable name of God. He continues: Judah, who sanctified the name of Heaven in public, merited that his entire name is called by the name of the Holy One, Blessed be He, for all the letters of the ineffable name of God are included within the name of Judah, with the addition of the letter dalet. When he confessed and said: “She is more righteous than I,” a Divine Voice went forth and said: You saved Tamar and her two children in her womb from being burned by the fire. By your life, i.e., in your merit, I will save three of your children from the fire. And who are they? Hananiah, Mishael, and Azariah (see Daniel, chapter 3).