  Results of modeling the spectra of two supernovae SN 2008D and SN 2006aj
related to the X-ray flash XRF 080109 and gamma-ray burst GRB / XRF 060218,
respectively, are studied. The spectra were obtained with the 6-meter BTA
telescope of the Special Astrophysical Observatory of the Russian Academy of
Sciences in 6.48 and 27.61 days after the explosion of SN 2008D, and in 2.55
and 3.55 days after the explosion of SN 2006aj. The spectra were interpreted in
the Sobolev approximation with the SYNOW code. An assumption about the presence
of envelopes around the progenitor stars is confirmed by an agreement between
the velocities of lines interpreted as hydrogen and helium, and the empiric
power-law velocity drop with time for the envelopes of classic core-collapse
supernovae. Detection of a P Cyg profile of the H-beta line in the spectra of
optical afterglows of GRBs can be a determinative argument in favor of this
hypothesis.
