Files
boc/rust-service/target/release/deps/libgetrandom-9b1825f45ddde54a.rmeta
T

690 lines
97 KiB
Plaintext
Raw Normal View History

rust
&#rustc 1.96.0 (ac68faa20 2026-05-25)ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁcfg_ifÁŸ=ê @Êq{0¡¡£ª-c28393f1568b0153Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8Á¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00ÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Á_ÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Á rand_coreÁk´—ÙEøç˜,æ/ûÕî-2c58c3d14d91165fÁ`ãŒN€ZÛ:õ\-7ce82f3507212cabÁimplementationÁt‰
getrandom_backendÁ extern_implÁüÝ !D inner_u32ÁL„úandroidÁ¬¿úlinuxÁœÖü¾,üº1D inner_u64ÁLú¡ =ú´ 6413Dçú¡ ¬“ú´ œªü’,üŽ1í_backendsÁerrorÁÀ  UNSUPPORTEDÁ ERRNO_NOT_POSITIVEÁ 
UNEXPECTEDÁ INTERNAL_STARTÁ  CUSTOM_STARTÁ 
from_errnoÁ from_neg_error_codeÁ  raw_os_errorÁ 
new_customÁ  new_internalÁ 
internal_descÁ××utilÁslice_assume_init_mutÁ ¥uninit_slice_fill_zeroÁslice_as_uninitÁ#¥slice_as_uninit_mutÁ%¥Í truncateÁerror_std_implsÁ*À***.÷sys_rngÁ000005ErrorÁ5 try_next_u32Á5 try_next_u64Á5try_fill_bytesÁ0fillÁ fill_uninitÁÔÚuse_fileÁDDDDDDDDDDutilsÁNNN get_errnoÁQ¿N sanitizerÁSSunpoisonÁNNsys_fill_exactÁW0impl Fn(&mut [MaybeUninit<u8>]) -> libc::ssize_tÁW D FILE_PATHÁD FD_UNINITÁDFD_ONGOING_INITÁDFDÁD
fill_innerÁ^ D
open_readonlyÁD open_or_waitÁDopen_fdÁDçcccccccwaitÁcwakeÁcwait_until_rng_readyÁlinux_android_with_fallbackÁmmmmmmmmmm m
m m m
m GetRandomFnÁm
NOT_AVAILABLEÁminitÁmuse_file_fallbackÁmŒlazyÁLazyPtrÁŠ
Š¥ŠˆŽ¥Žæ Ž cold_initÁ&impl FnOnce() -> Result<NonNull<T>, E>ÁŽtry_unsync_initÁ׎ unsync_initÁimpl FnOnce() -> NonNull<T>Á  GETRANDOM_FNÁ Q
RawOsErrorÁNonZeroRawOsErrorÁî 
 ˆ¥ƒ§Ö ª0SysRngÁ¬
00¯ƒ00²×0´>







"
#
%
7
8
9
9
@
A
U
W
W
^
`





¦
¨
«
«
°
³
³
³
Š   ¡î¢ˆ –¬æAs ÛÊØÊÊÐìʵßÊʾʿcÊÄcÊéßßîà ¬
ÑøÿËO ŸÊÛ¬¬­ô L¡s²úwØ0ØŠ ¿c³£ ±¬¤ ®¬¥ ¯¬§ © ª   ²¬ .ß´¬5¬:¬Š qÛØÐìµß¾¿cÄc
é³íUüÐôσ 
ÑÛÑÛ MaybeUninitÁÓÛuninitÁÝÔÛ»ÝÍõƒ«%9çbufÁŒüÙàUÿ!,  í
Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ÎÊ ì
Œ *¾
"×\MV    - ´¹
BÀ ì²
e
R  ¿ øvà4
üà3 ¤à 1‹Ád µÛ",] ÿÿÿÿÿÿÿÿÿ¤Ú

Ä


 (ìŒ
Ö¿ÎÊ ¨
^ É
Ò}'í
Aü¹´I‹ád i‹Þd Ö¿ˆ&€“€“TryFromIntErrorÁ‚“ˆ Z} Ràvq êdÂeôõ
 «ˆ&-˜ Ö¿ˆ&Ê@  
ù¶ «ˆ&Åÿ¶
•¢Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ˆê)?ÈXM´­Êˆ&ÂÉv“ üà4
lˆ& 
øx³7ü³6쳞ø,U¥ø,+ŽŠ Ö¿ˆ&Êùʼ} š
©· Ê5·
 Ö¿Ø(ÊÕ¯·
•¢Š(ˆ&
È·E w“
[Š(3':)EÔº+'
uκ+)'âÛ"#+ )
ïº+(
Ê•õº, Ö¿ÎÊ(²)¹'Ð
L,ýÓù+,Ýáù,
 !$%ôÈ,$ÕôÈ,$ Úýÿ=(b%ýÃ')^"% Ùýù=.b %
¦>b%eúá,"ý¾ºO#"½ˆâ,#
#s$&o*& Ù"#k$!&g$&
Ÿâ,#
"ý§áˆ,  !$
! ýÎù1, Û¼××
þù,
ªú,ÄÑ*
²†1.*ÛË/-¸†1/ Ö¿Ë/Ê*@* è+,j0+«Ë/g1 •¢Š(Ë/+É,Ð+ü³71lË/×lË/× ê Ä
õñ*EÓ†1. Ö¿Ë/ÊÉÊ"*ãj+q,Ï0,ÊÌ2-Ó2- Ö¿Ø(Ê,Ê2 •¢Š(Ë/-Ç2-Ó,Ú+
[Š(ÿ
.
0Ä5.Á50.  Û"á5 0¿5/ʼ6 Ö¿ÎÊ/s
0z
.n
W8büùçü²üÖï §ñü¦Ÿû  üêàýÐ!D,ÛsÚù‹÷cÚ‘æ ýð‹àç[ˆ&¢&ÊYÿ!¢&ÊÎu¥«¬ýYÿ!‡6Š6Îý–¶Ä÷\ˆ&ʯ ýö¶!ý¥·$ý¸÷ù,»tÚÌ·ýÀÜÿ,¹tÚý¤Ý,ýÂÝý,ý½ÈW,…tÚeÑÝ,ýí7ÂbîrÚå¹á,ý¬*ñFšî$Fù“¬Þ[ÿÝù““á4ýÞjKXÀÚuè;bý»•MXÊÚ}—<býïÁtNÆÚ§ýµ&¹^!ºÙÚíÄÂN!ýí¯ø
OéÚEþá,ÑîrÚýçá9,Í$šÈ$Ã%ÿݼ%µ$ÀÚ±$®$ÊÚ©$¦$ÆÚH$¡)ºÙÚœºü\ÎÊÊ åëº++ýáè$W,Êmùº+ýÄ…¨1ÆTË/Ê¢…­†1..K÷\Ë/ÊýF00B00ˆU´…Ž33£
ü\ÎÊÊ; 556Ê52À ŒÁ×ÿ!D€ ÙJÛ"ý ÿ!
…"ƒ
׃
Û"²0
•¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜Š(ˆ&
Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ˆ&ÊQ
Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ˆ&¢&¡
Š(  ˆ&ë
•¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜Š(Ë/$ Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ë/Ês Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙË/· Š(ê‡6ÊSˆ&wψ&¹
ˆ&)
ˆ&Ý Êi Š(Y  ˆ& Ë/X
Ð-ÆÝ,×ù×5Ð-ô ˆ&Þ  Ù…ôÈ,’BM
BU
$Û"5ëº+Ê +< +Ë/X .Ë/v
0Ê 0Š(ò 0Û":5Ê? 5r 5×ñ·vsys_fillÁƒresÁ¯Be¯BqÚŽ  
¹_
· «1½ ®Ž ~ ¹ Ë/×1¹¥ Ë/×errnoÁÃ
oŒ× ÊÛ/‡6Œ½
 ÊŒ Êý‡k XÚˆ&ýå•!XÚˆ&'Úˆ&#Úˆ&ÿ!ù!E¡#Ö$¨ÿ!ÿ!
ÚsÚwÿ5
ÏùE:ùEU®Ý,
±Ï鉈%F
ŽÏ銈%F«F
Ê
ë†1ÎÊYDÊÿ5Y¢& þj! Ê
ø«ø«]ù«innerÁ°3H c"/dev/urandom"Áÿÿÿÿ‡6-1Áþÿÿÿ‡6-2Á̧—Õˆ& Ë4Ì4Í4
__variant1ÁÎ4Ï4
__variant2Áë òg ü1

´
žÉH+ Àüàd}§ ïíe¼îËè¿*ÉHÈHùYó—Õˆ&Œ¾ ü‡# 
ÉHØ(ÉH
~‡6ÎÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
èIØ(‚K ŠŠˆ ÝEåiõܪÉH$‡ùJlœôŒ¼ù
$dü¨4 ÈHˆ&Û"ü„X   ÙÛ" ‡M ˆüèu
W¿MÂMØMƒ4 Ü âüÖå
  Û"+  ë«èI ª] d¬ÙýÕ€$%
 ÈHý®¤%
ÿÿÿÿÿÿÿÿÈHA üàü¦¿üŒ×ü¬ÉH‚KóüäWý¤R%ûÉH¨ý†~û%ªÉHE³¤%ªÉHEŤ%/ªÉHDÓ À Œ“×èI ‡MWN9ÚMAKÛ"œÈHm®¤%destÁZfptrÁb getrandom_fnÁÀ/}èIÛLüMhíJ)1}èI<J èIhèIovz}èIüã

²¥-:
A
Ò]õSQb üÞ% ŠõS ü¹PŠŠˆ ÝEåiõܪõS¤]¤]V¦]Á‚]üß3ø¤”& õSáUˆ8‚ì

™"×ÎÎ4<JP V
%ã¶Uݶ· Ú
ò ò Ö¿Ø(¨W
 •¢Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ø(¨W§ ïíe¼îËè¿*õS 6 p
w ~òƒò[áW§ ®z
ˆ
 Û"ˆ
´
¨WÌ Ö¿µX¨W
" ó ^ «µXw •¢áWµX n
u |þlµXvô  áUm•¹
Eš¹
%©¯´Uî0î0
UnsafeCellÁð0»Ì-·}—KEüC£™]™]š]Align8Áœ]ˆ] ̲ˆ364¥áUM‡O áU§
ýˆ¹'

ù]áUÕ¤¹¼À½À¾ÀË¿ÀÀÀÌÁÀÂÀGÃÀÄÀFÅÀÆÀ×`šÁ¬S øB-©¹«
®¹
 Ÿ  Ö¿µX¨W"üú½üâUèïöD÷\µX¨W¤?;\ªõSDŽ ˜ü\µX¨W¨Wß

 ¨WŒ
ýõ·ËÝ]õSä„ ýùM
ï]õSb
ý‚­ßû0¡\-þ¹ýØ>O¡\áU5„ºÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
µX¨W¬Â ùT¨V$‘•¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜áWµX*ë`(áW«µX¹áU¥Û"-ö¶µX^¨WÚáWòÛ"F
¨W´
ˆ
Î
ë\Ø
 é[婯ä¦è¹æŽ D¹Vƒ¢Vèˆ]ƒ    m«±[ ´Ué[ áUýŸ±!
þ]áUM©]-º±7

 £
¤
ü‚ ¢!1
¿±Ï  Z  ýã1!Z
 ˆ&mžT% 
¤ÿ 
õS¨W¨V$ÿ N|„
t ý…U#%
uœM%
 µXý€U)% Û¼µX
¨U%
Ú ÛµX  Ö¿µX¨Wlklü‹ ¤Õ ýœ°¬Ü]õS29ï]õSE°±8û0¡\2/¡\áU,ýâSù%ŸõS²ýšNOÁõSM¢T%ý´'COÈõSeÌOý¶ìZÚõSMÙOýå½Z

ùõ¬Þ[ ½Ýùõ“á4
ý¥.çZ â© Z ý˜@Z
Û©Îe÷1Z
ý”J¦%žõSÅŽU%bš9î$F^ÿÝX ë`¬ë Åa ¨V áU¥Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙµXµX1¨VÜnÎdôœcµX˜ˆ&7  ¦¤»M¹²âf¨VרVÝåd0
¼Ýé’ˆ%FHjq õS¿‡6ÎÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
µXØ(¾m×
õSØ(õS¾m‡6Çm£n/(' ©'2Û"R («µX'»¤µXÅa¾mÌmµÆnØÛ"ÉÐ3¦7»À(ºn¾m!
™"¾mÎ3ÎFN § Ö¿µXØ( ¨©»ÌmžÆnеX®¾m­¦"¾mö’qÖ¦ÚM¼¬1& ÈHüŸ3H)ŽM Ð. ÑÜiN…tÚÍ ÂÚÉH4½Û" Nª×‡MÈHìˆ&ÏÚMÑBY·2£QÚMùE‡Mÿ_ref__getrandom_fnÁ(FÄ

¦"'Ê3 Ê=FP
¨
Îþu$. %¥8E ô ô õ ¨÷ ˆÐ  mjçítoé‡6ý×%E ‡6
®8E-³8E Œw5 ‡6
½8EÔÞ"
«HHÏ
ýø7LE
‡6ˆ
ýéx E·
‡6-ª8E·
‡6-¹8Eùë¯Þ6"šàÍ¥8Ejþuqþux‡6U¥8EŒwH‡6]³8EŒwó¤¹
񯪋
 ӕ
 
0üÐ5
Ê$¬õ
 ”õ”z ˆ¥z
.üÏ< Ê$¬ÿ
 ”ÿ”z ¥z
.üá4 Ê$ý‡6ŽM) ŽM9  ø‡6I‡6e*‡6q‡6üÕ+
‡6ŽM°1ì‡6ŽM) ŽM9  ç‡6I‡6e*‡6q‡6üÆ)‡6ŽM°1 4$Œw= ‡6 œ$Lå-‡6%$.Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ‡6üâ-Àl×.
„’€€€€ ¡/²/2ü™.‰]
ÌÙ"…‚7úˆ5ÛŸ5 Û¼‡6ù °Ÿ45ÍŸ5Ú€*üÌ#æ ü†$¬ Z·
‡6,˜$ù ž¬5ôÉ%ù ÿžo5ù ćÛ5¯Ê‰ ‘Ÿ5ýÔ‘xÆù ˆˆ'5ƹ ³Ÿ5Ú€”é#Ê$à#‡6$Š$ŒwlE‡61ÎtÎ|;codeÁCúI ¥ˆ5ÆÉ‡6I È5ÆÉ‡6…‚Í…‚ÔŒº1‡6ü¤1'‡6 Ê1üÛ11üä1&eØfEýïb"E Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙŒw`•ÒfEÛ"! 
øfEÛŒw
ßjE¾üÕ18   Œ2“2üŠ0‰ü™1zý˜fÎE´
‡6eófEýŒaE³
‡6/šî$FœÿÝ®Ê,­0¥z ¢0‡6$1‡6ÈŒw¼†Û"=ófE2¹?‡„DÒœ¤1‡6
¡”éêˆ%F t9 »1S‡6.Sd‡6ML$…2]
eüä1 
´
‡66ˆ ‰2Ñ  Ï ’2ÖÕÒÊt¥zs‡6r‡69¥zŒw
‡6¹¥‡„«:i‡6Œª4‡6ü’4)‡6 º4üË41üÔ4&ŒŠ ¼†£DQÛ"d DÛŒwBrüÅ48   ü4ƒ5üí2–ü‡4|@´
‡6È;9³
‡6dš5œÿÝ®Ê,™3¥z Ž3‡6$4‡6mŒw9¼†¼Û"1a¹=‡„BÁ¬’4
‡6ô‰, kÕ «4ï‡6Êï]
‡6éè$õ4ù
üÔ4 1 ù4´  ² ‚5¹¸µÊf¥ze‡6d‡6Ð¥züŒw£‡6¼¹‡„œ\
‡6¤Ø
Ì«NüØ 
õS ÷ä ü÷íüÎýŠ«ENÂ
ÑÛÑÛæÓÛûÝÔÛ»ÝÍõƒ«%9õS¹ «“D¿ ü“ª“Å ü“çžµ Ò³¤Ù üÙ -å”

ò
%üúøüÏ £Â«“rД¬³ Ôå”{ª“˜žµ Ó i
Õëƒ?ÑÛÑÛæÓÛûÝÔÛ»ÝÍõƒ«%9ŽM%–Ë?
r

Ð-_ Ù
ˆ&v  Àmú
¼ú

Ô² 

 (žØs²! !Ú Ê< Ì Ö¿ 
©Ê¸
ÇÍÚ"Êò$ò$ Ö¿Ø(Ê$ •¢Š(™6$/6mn[Š(]dz)ˆ)Û"ˆ) ´)ÊÌ* Ö¿ŽMÊÑØ  £$£h üÉ !œ! Ä™
Eü½ 0 Ö¿™Ê
h
x^"«™w# •¢Š(™ºÁÄú
l™¦äÿˆ  ý‡ä#?%½‡ä?%
% ÃÛÃÛ ManuallyDropÁÅÛ»¬µÜÀ,%*ŽMZ& ŽM
©ä?%ýàÕ%N(
°ä?% ˜ üü  Ö¿ŽMÊ õ',üÀ Þüï ¯üÛ Ãüö ~ÔÛâ`ý¹ƒR?òŽMäý ýúɺ?öŽMd˜
* ÂŽMÚ
¹ÀŽMÜÒ
hîrÚüµ
9 š œ
ÿÝ®
¹ ÀÚÊ Ñ ÊÚã ê ÆÚU ºÙÚüÁ®A
ܲ9ÛsÚTÒ÷\ÎÊìøü\™ÊÊ?ÓÞÊðí ©»öôÂÙjÒ÷\™Êôì""ø""ýÕàì?÷ŽMlŒÿ%ÛÇžŽM]Ÿä?%ýµ‚³Z%ŽM5«ä?%ý¨ÃåN'ÝŽMUÖƒZ'ü\ŽMÊÊÓ))Þ*Êð)Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ŽMÊ”Ö ÿ–²×nÐ- ú •¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜Š(™nÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
™Ê¿Š(Š™
ŽMçÿ–è ÿ–u–Ë? ’BU À ñ™
Û"Õ"ÊÚÁœŸ
B¿
™^"ÊÚ"Š(ò"•Ÿ?% Çž?%Û"² )Ê´)ˆ)¯B/ dstÁß »Ž c¹æÊ
"ŽMˆ&
"Úˆ& "Úˆ&«F±"½˜èùEw
ÇŽMýªâ#?
Ï ÑÛÑÛæÓÛûÝÔÛ»ÝÍõƒ«%9Ì
;'

Ð-_ Ù
ˆ&v  Ào¦¼¦
É  Ò ½˜Ç î ÊÇ Ö* Ó*Ú Ê
Æ  Ì Ö¿™Ê°
¿ÅÚ"Êò$ò$ Ö¿Ø(Ê$ •¢Š(™6$'.[Š(U\z)ˆ)Û"ˆ) ´)ÊÌ* Ö¿ÊÉÐ ¾ É$d )  Á \[!XÁœTS

¾  Ö¿™Ê
[
kr^"«™w# •¢Š(™­´Ħl™¡ä«´  ¼ %¸ %¿ % ÃÛÃÛÓÅÛ»¬µÜÀ,%*« & © %¦ (¢ % Ä ü¨  Ö¿Ê ÇÓo(,üìÞü›¯ü‡Ãü¢~²¹ÀCŸ òä©öÀ)ÂÚ¹ÀÜþhîrÚüá9 š œ
ÿÝ®
¹ ÀÚÊ Ñ ÊÚã ê ÆÚU ºÙÚA⣠9ÛsÚÒ÷\Îʦìøü\™ÊÊÐÓÞÊð~ ©L
ÂÙûÒ÷\™Ê¼ì""ø"" ÷l¸&%Ûý±Œ %%% 'Ý| 'ü\ÊÊ4Ó))Þ*Êð)Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
Ê”‚˪\×QÐ- ¦«¦Î„§ÎŠ(¡™&˪ ˪Ø ’BU À Æ™ßÛ"ª+ÊÚÁœtB™^"ÊÚ"Š(ò"¾²% ý±%Û"² )Ê´)ˆ)¯B5œ¨»ãŽ t¹üý
"ˆ&
"Úˆ& "Úˆ&«F±"½˜ºùEw
ÇÒ°(O· !+(QÄ
êc (0³GÖ¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ΟȟȠÈî éBLÉ¥¼Ñ  c cˆ¢cµ
 `£c· `àB¤GS
±,7ݼBµ8Rˬù"
'ú7ü­MüÐ"@B·¥”Ë  Aã¿x¬š%
(Û 8üŽ Müñ$@C°¸”¬ ©À ?èÀvŒ¼

@
Ó
9üï dÀ Œ 
©ÀL
™
ƒQDëÁ øq‚8ü‚7ü—ìë’BèçBQ
w
 w
 È# ü”@5 õ þ½˜ó à ß*  ï* TïîëÁœçæ
Q Ö¿™Ê
\
mt^«™w •¢Š(™¯ü‚8 l™ ºÀ ~Ú
 Ê1 ö Ì Ö¿™Ê
N
_fÚÊòò Ö¿Ø(Ê •¢Š(™6ÉÐú[Š(òùzˆÛ"ˆ ´ÊÌ Ö¿ÎÊfmë N ó@ü¬œÉÐ×üI%©ÃQaÂÄ™Á<Aö9A I9 9ÛsÚ8Ò÷\ÎÊLìø
ü\™ÊÊvÓÞÊð$ ©ò-+ÂÙ¡Ò÷\™ÊÑìøü\ÎÊÊùÓÞÊðÀ ŒÌ™«¦2„§1×0Š(g™Ž’BÁœ5À °™Éˆ&w
Û"Õ0ÊÚÁœf’B™^ÊÚŠ(òÛ"² Ê´ˆƒQ²Ž ¹-X½˜JùEw ww¸Ç¥ØZ ©½˜žÅß*ï*
ª ©¦
Áœ¢ ¡

P
  Ö¿™Êï  ÚÊò ò Ö¿Ø(Ê •¢Š(Î 6 š_Ù[Š(½
Ä z
ˆ 
Û"ˆ  ´ ÊÌ
Ö¿™Ê 2 9
Í#RY'ÉAÀµ¼Ã²9ÛsÚ°Ò÷\ÎÊÃìøü\™ÊÊìÓ  Þ
Êð  ©g¡   Ÿ  ÂÙ! „§Äõו¢˜¢™¢lš¢ˆ›¢œ¢[¢ˆe0<#˜Š(ΠÀ çŠ(ᙈ&wÛ"Õ0ÊÚŠ(òÛ"² Ê´ ˆ ÁœÄ! ’Bä! ƒQÅŽ J¹>Îv½˜~ùEwä ã¿ú #BÛ ·¥”à"ñ ã¿1 º èÀÐ ±%C± °¸%Ç èÀ äÕ ŠõS(ùT3´U:A„Û
  ¡%Ê0Œw7>       *0@ABCí_4¢æÑÛìL€;ô4¸¬<ô­<î >ž?ü9ø$ü9,) [`Error::UNEXPECTED`]: Error::UNEXPECTEDÁüf  [`fill_uninit`]: fill_uninitÁøåž ü®&åž# getrandom: system's random number generator
[![Build Status]][GitHub Actions]
[![Crate]][crates.io]
[![Documentation]][docs.rs]
[![Dependency Status]][deps.rs]
[![Downloads]][crates.io]
[![License]][LICENSE-MIT]
`getrandom` is a Rust library for retrieving random data from (operating) system sources.
It is assumed that the system always provides high-quality, cryptographically secure random
data, ideally backed by hardware entropy sources. This crate derives its name from
the Linux `getrandom` syscall but is cross-platform, roughly supporting the same set
of platforms as Rust's `std` library.
This is a low-level API. Most users should prefer using a higher-level random-number
library like [`rand`].
[`rand`]: https://crates.io/crates/rand
## Examples
```rust
fn get_random_u128() -> Result<u128, getrandom::Error> {
let mut buf = [0u8; 16];
getrandom::fill(&mut buf)?;
Ok(u128::from_ne_bytes(buf))
}
```
## Supported targets
| Target | Target Triple | Implementation
| ------------------ | ------------------ | --------------
| Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random`
| Windows 10+ | `*‑windows‑*` | [`ProcessPrng`]
| Windows 7, 8 | `*-win7‑windows‑*` | [`RtlGenRandom`]
| macOS | `*‑apple‑darwin` | [`getentropy`][3]
| iOS, tvOS, watchOS | `*‑apple‑{ios,tvos,watchos}` | [`CCRandomGenerateBytes`]
| FreeBSD | `*‑freebsd` | [`getrandom`][5]
| OpenBSD | `*‑openbsd` | [`getentropy`][7]
| NetBSD | `*‑netbsd` | [`getrandom`][16] if available, otherwise [`kern.arandom`][8]
| Dragonfly BSD | `*‑dragonfly` | [`getrandom`][9]
| Solaris | `*‑solaris` | [`getrandom`][11] with `GRND_RANDOM`
| illumos | `*‑illumos` | [`getrandom`][12]
| Fuchsia OS | `*‑fuchsia` | [`cprng_draw`]
| Redox | `*‑redox` | `/dev/urandom`
| Haiku | `*‑haiku` | `/dev/urandom` (identical to `/dev/random`)
| Hermit | `*-hermit` | [`sys_read_entropy`]
| Hurd | `*-hurd-*` | [`getrandom`][17]
| SGX | `x86_64‑*‑sgx` | [`RDRAND`]
| VxWorks | `*‑wrs‑vxworks‑*` | `randABytes` after checking entropy pool initialization with `randSecure`
| Emscripten | `*‑emscripten` | [`getentropy`][13]
| WASI 0.1 | `wasm32‑wasip1` | [`random_get`]
| WASI 0.2 | `wasm32‑wasip2` | [`get-random-u64`]
| SOLID | `*-kmc-solid_*` | `SOLID_RNG_SampleRandomBytes`
| Nintendo 3DS | `*-nintendo-3ds` | [`getrandom`][18]
| ESP-IDF | `*‑espidf` | [`esp_fill_random`] WARNING: see "Early Boot" section below
| PS Vita | `*-vita-*` | [`getentropy`][19]
| QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
| AIX | `*-ibm-aix` | [`/dev/urandom`][15]
| Cygwin | `*-cygwin` | [`getrandom`][20] (based on [`RtlGenRandom`])
| Motor OS | `x86_64-unknown-motor` | [`RDRAND`]
Pull Requests that add support for new targets to `getrandom` are always welcome.
### WebAssembly support
This crate fully supports the [WASI] and [Emscripten] targets. However, the `wasm32-unknown-unknown`
and `wasm64-unknown-unknown` targets (i.e. the target used by `wasm-pack`)
are not automatically supported since, from the target name alone, we cannot deduce
which JavaScript interface should be used (or if JavaScript is available at all).
We do not include support for these targets in the default configuration because our JS backend
(supporting web browsers, web workers and Node.js v19 or later) requires [`wasm-bindgen`],
**bloating `Cargo.lock`** and **potentially breaking builds** on non-web WASM platforms.
To enable `getrandom`'s functionality on `wasm32/64-unknown-unknown` using
[`Crypto.getRandomValues`] via [`wasm-bindgen`], enable the `wasm_js` crate feature.
WARNING: We strongly recommend against enabling this feature in libraries (except for tests)
since it is known to break non-Web WASM builds and further since the usage of `wasm-bindgen`
causes significant bloat to `Cargo.lock` (on all targets).
The only exception to this rule: if your crate already unconditionally depends on `wasm-bindgen`
or `js-sys` on "unknown" WASM targets then it's acceptable to enable this feature unconditionally.
### Opt-in backends
`getrandom` also provides optional (opt-in) backends, which allow users to customize the source
of randomness based on their specific needs:
| Backend name | Target | Target Triple | Implementation
| ------------------- | -------------------- | ------------------------ | --------------
| `linux_getrandom` | Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call (without `/dev/urandom` fallback). Bumps minimum supported Linux kernel version to 3.17 and Android API level to 23 (Marshmallow).
| `linux_raw` | Linux, Android | `*‑linux‑*` | Same as `linux_getrandom`, but uses raw `asm!`-based syscalls instead of `libc`.
| `rdrand` | x86, x86-64 | `x86_64-*`, `i686-*` | [`RDRAND`] instruction
| `rndr` | AArch64 | `aarch64-*` | [`RNDR`] register
| `efi_rng` | UEFI | `*-unknown‑uefi` | [`EFI_RNG_PROTOCOL`] with `EFI_RNG_ALGORITHM_RAW` (requires `std` and Nightly compiler)
| `windows_legacy` | Windows | `*-windows-*` | [`RtlGenRandom`]
| `custom` | All targets | `*` | User-provided custom implementation (see [custom backend])
| `unsupported` | All targets | `*` | Always returns `Err(Error::UNSUPPORTED)` (see [unsupported backend])
| `extern_impl` | All targets | `*` | Externally-provided custom implementation (see [externally implemented interface])
Opt-in backends can be enabled using the `getrandom_backend` configuration flag.
The flag can be set either by specifying the `rustflags` field in [`.cargo/config.toml`]:
```toml
# It's recommended to set the flag on a per-target basis:
[target.'cfg(target_os = "linux")']
rustflags = ['--cfg', 'getrandom_backend="linux_getrandom"']
```
Or by using the `RUSTFLAGS` environment variable:
```sh
RUSTFLAGS='--cfg getrandom_backend="linux_getrandom"' cargo build
```
Enabling an opt-in backend will replace the backend used by default. Doing this for
an incorrect target (e.g. using `linux_getrandom` while compiling for a Windows target)
will result in a compilation error. Be extremely careful while using opt-in backends,
as incorrect configuration may result in vulnerable applications or applications
that always panic.
Note that using an opt-in backend in a library (e.g. for tests or benchmarks)
WILL NOT have any effect on its downstream users.
[`.cargo/config.toml`]: https://doc.rust-lang.org/cargo/reference/config.html
### Raw Linux syscall support
Currently the `linux_raw` backend supports only targets with stabilized `asm!` macro,
i.e. `arm`, `aarch64`, `loongarch64`, `riscv32`, `riscv64`, `s390x`, `x86`, and `x86_64`.
Note that the raw syscall backend may be slower than backends based on `libc::getrandom`,
e.g. it does not implement vDSO optimizations and on `x86` it uses the infamously slow
`int 0x80` instruction to perform syscall.
### Custom backend
If this crate does not support your target out of the box or you have to use
a non-default entropy source, then you can provide a custom implementation.
You need to enable the custom backend as described in the
[opt-in backends][opt-in] section.
Next, you need to define an `extern` function with the following signature:
```rust
use getrandom::Error;
#[unsafe(no_mangle)]
unsafe extern "Rust" fn __getrandom_v03_custom(
dest: *mut u8,
len: usize,
) -> Result<(), Error> {
todo!()
}
```
This function should, ideally, be defined in the root crate of your project,
e.g. in your `main.rs`. This function MUST be defined only once for your
project, i.e. upstream library crates SHOULD NOT define it outside of
tests and benchmarks. Improper configuration of this backend may result
in linking errors.
The function accepts a pointer to a buffer that should be filled with random
data and its length in bytes. Note that the buffer MAY be uninitialized.
On success, the function should return `Ok(())` and fully fill the input buffer;
otherwise, it should return an error value.
While wrapping functions which work with byte slices you should fully initialize
the buffer before passing it to the function:
```rust
use getrandom::Error;
fn my_entropy_source(buf: &mut [u8]) -> Result<(), getrandom::Error> {
// ...
Ok(())
}
#[unsafe(no_mangle)]
unsafe extern "Rust" fn __getrandom_v03_custom(
dest: *mut u8,
len: usize,
) -> Result<(), Error> {
let buf = unsafe {
// fill the buffer with zeros
core::ptr::write_bytes(dest, 0, len);
// create mutable byte slice
core::slice::from_raw_parts_mut(dest, len)
};
my_entropy_source(buf)
}
```
### Externally Implemented Interface
Using the nightly-only feature [`extern_item_impls`] it is possible to provide
a custom backend for `getrandom`, even to override an existing first-party implementation.
First, enable the `extern_impl` opt-in backend to allow usage of this nightly feature.
Then, you may provide implementations for `fill_uninit`, `u32`, and/or `u64`
with an attribute macro from the `implementation` module.
[`extern_item_impls`]: https://github.com/rust-lang/rust/issues/125418
```rust
use core::mem::MaybeUninit;
#[cfg(getrandom_backend = "extern_impl")]
#[getrandom::implementation::fill_uninit]
fn my_fill_uninit_implementation(
dest: &mut [MaybeUninit<u8>]
) -> Result<(), getrandom::Error> {
// ...
Ok(())
}
```
For further details on what a suitable implementation for `fill_uninit` may look
like, see [custom backend].
`getrandom` will provide a default implementation for `u32` and `u64`, but does
not currently provide a default for `fill_uninit`, even if one is normally
available for the current target. If no implementation is available,
a compilation error will be raised with instructions for how to provide
an implementation.
### Unsupported backend
In some rare scenarios, you might be compiling this crate for an unsupported
target (e.g. `wasm32-unknown-unknown`), but this crate's functionality
is not actually used by your code. If you are confident that `getrandom` is
not used in your project, but it gets pulled nevertheless by one of your
dependencies, then you can enable the `unsupported` backend, which always
returns `Err(Error::UNSUPPORTED)`.
### Platform Support
This crate generally supports the same operating system and platform versions
that the Rust standard library does. Additional targets may be supported using
the opt-in custom backend.
This means that as Rust drops support for old versions of operating systems
(such as old Linux kernel versions, Android API levels, etc.) in stable releases,
`getrandom` may create new patch releases that remove support for
outdated platform versions.
### `/dev/urandom` fallback on Linux and Android
On Linux targets, the `/dev/urandom` fallback is present only if either `target_env`
is `musl`, or `target_arch` is one of the following: `aarch64`, `arm`, `powerpc`,
`powerpc64`, `s390x`, `x86`, `x86_64`. Other supported targets [require][platform-support]
kernel versions that support the `getrandom` system call, so the fallback is not needed.
On Android targets the fallback is present only for the following `target_arch`es:
`aarch64`, `arm`, `x86`, `x86_64`. Other `target_arch`es (e.g. RISC-V) require
sufficiently high API levels.
The fallback can be disabled by enabling the `linux_getrandom` opt-in backend.
Note that doing so will bump minimum supported Linux kernel version to 3.17
and Android API level to 23 (Marshmallow).
### Early boot
Sometimes, early in the boot process, the OS has not collected enough
entropy to securely seed its RNG. This is especially common on virtual
machines, where standard "random" events are hard to come by.
Some operating system interfaces always block until the RNG is securely
seeded. This can take anywhere from a few seconds to more than a minute.
A few (Linux, NetBSD and Solaris) offer a choice between blocking and
getting an error; in these cases, we always choose to block.
On Linux (when the `getrandom` system call is not available), reading from
`/dev/urandom` never blocks, even when the OS hasn't collected enough
entropy yet. To avoid returning low-entropy bytes, we first poll
`/dev/random` and only switch to `/dev/urandom` once this has succeeded.
On OpenBSD, this kind of entropy accounting isn't available, and on
NetBSD, blocking on it is discouraged. On these platforms, nonblocking
interfaces are used, even when reliable entropy may not be available.
On the platforms where it is used, the reliability of entropy accounting
itself isn't free from controversy. This library provides randomness
sourced according to the platform's best practices, but each platform has
its own limits on the grade of randomness it can promise in environments
with few sources of entropy.
On ESP-IDF, if `esp_fill_random` is used before enabling WiFi, BT, or the
voltage noise entropy source (SAR ADC), the Hardware RNG will only be seeded
via RC_FAST_CLK. This can occur during early boot unless
`bootloader_random_enable()` is called. For more information see the
[ESP-IDF RNG Docs][esp-idf-rng] or the
[RNG section of the ESP32 Technical Reference Manual][esp-trng-docs].
## Error handling
We always prioritize failure over returning known insecure "random" bytes.
Generally, on supported platforms, failure is highly unlikely, though not
impossible. If an error does occur, it is likely that it will occur
on every call to `getrandom`. Therefore, after the first successful call,
one can be reasonably confident that no errors will occur.
## Panic handling
We strive to eliminate all potential panics from our backend implementations.
In other words, when compiled with optimizations enabled, the generated
binary code for `getrandom` functions should not contain any panic branches.
Even if the platform misbehaves and returns an unexpected result,
our code should correctly handle it and return an error, e.g.
[`Error::UNEXPECTED`].
## Sanitizer support
If your code uses [`fill_uninit`] and you enable
[MemorySanitizer](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#memorysanitizer)
(i.e. `-Zsanitizer=memory`), we will automatically handle unpoisoning
of the destination buffer filled by `fill_uninit`.
You can run sanitizer tests for your crate dependent on `getrandom` like this:
```sh
RUSTFLAGS="-Zsanitizer=memory" cargo test -Zbuild-std --target=x86_64-unknown-linux-gnu
```
## Minimum Supported Rust Version
This crate requires Rust 1.85 or later.
The most reliable way to get an MSRV-respecting behavior is to set
`CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback` when doing
`cargo update -p getrandom`, like so:
```sh
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo update -p getrandom
```
## License
The `getrandom` library is distributed under either of
* [Apache License, Version 2.0][LICENSE-APACHE]
* [MIT license][LICENSE-MIT]
at your option.