libsodium-wrappers
Version:
The Sodium cryptographic library compiled to pure JavaScript (wrappers)
1 lines • 112 kB
JavaScript
!function(e){function r(e,r){"use strict";var t,a=r.ready.then(function(){function a(){if(t._sodium_init()<0)throw new Error("libsodium was not correctly initialized.");for(var r=["crypto_aead_aegis128l_decrypt","crypto_aead_aegis128l_decrypt_detached","crypto_aead_aegis128l_encrypt","crypto_aead_aegis128l_encrypt_detached","crypto_aead_aegis128l_keygen","crypto_aead_aegis256_decrypt","crypto_aead_aegis256_decrypt_detached","crypto_aead_aegis256_encrypt","crypto_aead_aegis256_encrypt_detached","crypto_aead_aegis256_keygen","crypto_aead_chacha20poly1305_decrypt","crypto_aead_chacha20poly1305_decrypt_detached","crypto_aead_chacha20poly1305_encrypt","crypto_aead_chacha20poly1305_encrypt_detached","crypto_aead_chacha20poly1305_ietf_decrypt","crypto_aead_chacha20poly1305_ietf_decrypt_detached","crypto_aead_chacha20poly1305_ietf_encrypt","crypto_aead_chacha20poly1305_ietf_encrypt_detached","crypto_aead_chacha20poly1305_ietf_keygen","crypto_aead_chacha20poly1305_keygen","crypto_aead_xchacha20poly1305_ietf_decrypt","crypto_aead_xchacha20poly1305_ietf_decrypt_detached","crypto_aead_xchacha20poly1305_ietf_encrypt","crypto_aead_xchacha20poly1305_ietf_encrypt_detached","crypto_aead_xchacha20poly1305_ietf_keygen","crypto_auth","crypto_auth_hmacsha256","crypto_auth_hmacsha256_final","crypto_auth_hmacsha256_init","crypto_auth_hmacsha256_keygen","crypto_auth_hmacsha256_update","crypto_auth_hmacsha256_verify","crypto_auth_hmacsha512","crypto_auth_hmacsha512256","crypto_auth_hmacsha512256_final","crypto_auth_hmacsha512256_init","crypto_auth_hmacsha512256_keygen","crypto_auth_hmacsha512256_update","crypto_auth_hmacsha512256_verify","crypto_auth_hmacsha512_final","crypto_auth_hmacsha512_init","crypto_auth_hmacsha512_keygen","crypto_auth_hmacsha512_update","crypto_auth_hmacsha512_verify","crypto_auth_keygen","crypto_auth_verify","crypto_box_beforenm","crypto_box_curve25519xchacha20poly1305_beforenm","crypto_box_curve25519xchacha20poly1305_detached","crypto_box_curve25519xchacha20poly1305_detached_afternm","crypto_box_curve25519xchacha20poly1305_easy","crypto_box_curve25519xchacha20poly1305_easy_afternm","crypto_box_curve25519xchacha20poly1305_keypair","crypto_box_curve25519xchacha20poly1305_open_detached","crypto_box_curve25519xchacha20poly1305_open_detached_afternm","crypto_box_curve25519xchacha20poly1305_open_easy","crypto_box_curve25519xchacha20poly1305_open_easy_afternm","crypto_box_curve25519xchacha20poly1305_seal","crypto_box_curve25519xchacha20poly1305_seal_open","crypto_box_curve25519xchacha20poly1305_seed_keypair","crypto_box_detached","crypto_box_easy","crypto_box_easy_afternm","crypto_box_keypair","crypto_box_open_detached","crypto_box_open_easy","crypto_box_open_easy_afternm","crypto_box_seal","crypto_box_seal_open","crypto_box_seed_keypair","crypto_core_ed25519_add","crypto_core_ed25519_from_hash","crypto_core_ed25519_from_uniform","crypto_core_ed25519_is_valid_point","crypto_core_ed25519_random","crypto_core_ed25519_scalar_add","crypto_core_ed25519_scalar_complement","crypto_core_ed25519_scalar_invert","crypto_core_ed25519_scalar_mul","crypto_core_ed25519_scalar_negate","crypto_core_ed25519_scalar_random","crypto_core_ed25519_scalar_reduce","crypto_core_ed25519_scalar_sub","crypto_core_ed25519_sub","crypto_core_hchacha20","crypto_core_hsalsa20","crypto_core_ristretto255_add","crypto_core_ristretto255_from_hash","crypto_core_ristretto255_is_valid_point","crypto_core_ristretto255_random","crypto_core_ristretto255_scalar_add","crypto_core_ristretto255_scalar_complement","crypto_core_ristretto255_scalar_invert","crypto_core_ristretto255_scalar_mul","crypto_core_ristretto255_scalar_negate","crypto_core_ristretto255_scalar_random","crypto_core_ristretto255_scalar_reduce","crypto_core_ristretto255_scalar_sub","crypto_core_ristretto255_sub","crypto_generichash","crypto_generichash_blake2b_salt_personal","crypto_generichash_final","crypto_generichash_init","crypto_generichash_keygen","crypto_generichash_update","crypto_hash","crypto_hash_sha256","crypto_hash_sha256_final","crypto_hash_sha256_init","crypto_hash_sha256_update","crypto_hash_sha512","crypto_hash_sha512_final","crypto_hash_sha512_init","crypto_hash_sha512_update","crypto_ipcrypt_decrypt","crypto_ipcrypt_encrypt","crypto_ipcrypt_keygen","crypto_ipcrypt_nd_decrypt","crypto_ipcrypt_nd_encrypt","crypto_ipcrypt_ndx_decrypt","crypto_ipcrypt_ndx_encrypt","crypto_ipcrypt_ndx_keygen","crypto_ipcrypt_pfx_decrypt","crypto_ipcrypt_pfx_encrypt","crypto_ipcrypt_pfx_keygen","crypto_kdf_derive_from_key","crypto_kdf_keygen","crypto_kx_client_session_keys","crypto_kx_keypair","crypto_kx_seed_keypair","crypto_kx_server_session_keys","crypto_onetimeauth","crypto_onetimeauth_final","crypto_onetimeauth_init","crypto_onetimeauth_keygen","crypto_onetimeauth_update","crypto_onetimeauth_verify","crypto_pwhash","crypto_pwhash_scryptsalsa208sha256","crypto_pwhash_scryptsalsa208sha256_ll","crypto_pwhash_scryptsalsa208sha256_str","crypto_pwhash_scryptsalsa208sha256_str_verify","crypto_pwhash_str","crypto_pwhash_str_needs_rehash","crypto_pwhash_str_verify","crypto_scalarmult","crypto_scalarmult_base","crypto_scalarmult_ed25519","crypto_scalarmult_ed25519_base","crypto_scalarmult_ed25519_base_noclamp","crypto_scalarmult_ed25519_noclamp","crypto_scalarmult_ristretto255","crypto_scalarmult_ristretto255_base","crypto_secretbox_detached","crypto_secretbox_easy","crypto_secretbox_keygen","crypto_secretbox_open_detached","crypto_secretbox_open_easy","crypto_secretstream_xchacha20poly1305_init_pull","crypto_secretstream_xchacha20poly1305_init_push","crypto_secretstream_xchacha20poly1305_keygen","crypto_secretstream_xchacha20poly1305_pull","crypto_secretstream_xchacha20poly1305_push","crypto_secretstream_xchacha20poly1305_rekey","crypto_shorthash","crypto_shorthash_keygen","crypto_shorthash_siphashx24","crypto_sign","crypto_sign_detached","crypto_sign_ed25519_pk_to_curve25519","crypto_sign_ed25519_sk_to_curve25519","crypto_sign_ed25519_sk_to_pk","crypto_sign_ed25519_sk_to_seed","crypto_sign_final_create","crypto_sign_final_verify","crypto_sign_init","crypto_sign_keypair","crypto_sign_open","crypto_sign_seed_keypair","crypto_sign_update","crypto_sign_verify_detached","crypto_stream_chacha20","crypto_stream_chacha20_ietf_xor","crypto_stream_chacha20_ietf_xor_ic","crypto_stream_chacha20_keygen","crypto_stream_chacha20_xor","crypto_stream_chacha20_xor_ic","crypto_stream_keygen","crypto_stream_xchacha20_keygen","crypto_stream_xchacha20_xor","crypto_stream_xchacha20_xor_ic","crypto_xof_shake128","crypto_xof_shake128_init","crypto_xof_shake128_init_with_domain","crypto_xof_shake128_squeeze","crypto_xof_shake128_update","crypto_xof_shake256","crypto_xof_shake256_init","crypto_xof_shake256_init_with_domain","crypto_xof_shake256_squeeze","crypto_xof_shake256_update","crypto_xof_turboshake128","crypto_xof_turboshake128_init","crypto_xof_turboshake128_init_with_domain","crypto_xof_turboshake128_squeeze","crypto_xof_turboshake128_update","crypto_xof_turboshake256","crypto_xof_turboshake256_init","crypto_xof_turboshake256_init_with_domain","crypto_xof_turboshake256_squeeze","crypto_xof_turboshake256_update","randombytes_buf","randombytes_buf_deterministic","randombytes_close","randombytes_random","randombytes_set_implementation","randombytes_stir","randombytes_uniform","sodium_bin2ip","sodium_ip2bin","sodium_version_string"],a=[E,k,S,T,w,Y,B,A,M,I,K,N,L,O,U,P,C,R,X,D,G,F,V,q,z,W,H,j,J,Q,Z,$,ee,re,te,ae,_e,ne,se,ce,oe,pe,he,ye,ie,le,ue,de,ve,ge,be,fe,me,xe,Ee,ke,Se,Te,we,Ye,Be,Ae,Me,Ie,Ke,Ne,Le,Oe,Ue,Pe,Ce,Re,Xe,De,Ge,Fe,Ve,qe,ze,We,He,je,Je,Qe,Ze,$e,er,rr,tr,ar,_r,nr,sr,cr,or,pr,hr,yr,ir,lr,ur,dr,vr,gr,br,fr,mr,xr,Er,kr,Sr,Tr,wr,Yr,Br,Ar,Mr,Ir,Kr,Nr,Lr,Or,Ur,Pr,Cr,Rr,Xr,Dr,Gr,Fr,Vr,qr,zr,Wr,Hr,jr,Jr,Qr,Zr,$r,et,rt,tt,at,_t,nt,st,ct,ot,pt,ht,yt,it,lt,ut,dt,vt,gt,bt,ft,mt,xt,Et,kt,St,Tt,wt,Yt,Bt,At,Mt,It,Kt,Nt,Lt,Ot,Ut,Pt,Ct,Rt,Xt,Dt,Gt,Ft,Vt,qt,zt,Wt,Ht,jt,Jt,Qt,Zt,$t,ea,ra,ta,aa,_a,na,sa,ca,oa,pa,ha,ya,ia,la,ua,da,va,ga,ba,fa,ma,xa,Ea,ka,Sa,Ta,wa],_=0;_<a.length;_++)"function"==typeof t["_"+r[_]]&&(e[r[_]]=a[_]);var n=["SODIUM_LIBRARY_VERSION_MAJOR","SODIUM_LIBRARY_VERSION_MINOR","crypto_aead_aegis128l_ABYTES","crypto_aead_aegis128l_KEYBYTES","crypto_aead_aegis128l_MESSAGEBYTES_MAX","crypto_aead_aegis128l_NPUBBYTES","crypto_aead_aegis128l_NSECBYTES","crypto_aead_aegis256_ABYTES","crypto_aead_aegis256_KEYBYTES","crypto_aead_aegis256_MESSAGEBYTES_MAX","crypto_aead_aegis256_NPUBBYTES","crypto_aead_aegis256_NSECBYTES","crypto_aead_aes256gcm_ABYTES","crypto_aead_aes256gcm_KEYBYTES","crypto_aead_aes256gcm_MESSAGEBYTES_MAX","crypto_aead_aes256gcm_NPUBBYTES","crypto_aead_aes256gcm_NSECBYTES","crypto_aead_chacha20poly1305_ABYTES","crypto_aead_chacha20poly1305_IETF_ABYTES","crypto_aead_chacha20poly1305_IETF_KEYBYTES","crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_IETF_NPUBBYTES","crypto_aead_chacha20poly1305_IETF_NSECBYTES","crypto_aead_chacha20poly1305_KEYBYTES","crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_NPUBBYTES","crypto_aead_chacha20poly1305_NSECBYTES","crypto_aead_chacha20poly1305_ietf_ABYTES","crypto_aead_chacha20poly1305_ietf_KEYBYTES","crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_chacha20poly1305_ietf_NPUBBYTES","crypto_aead_chacha20poly1305_ietf_NSECBYTES","crypto_aead_xchacha20poly1305_IETF_ABYTES","crypto_aead_xchacha20poly1305_IETF_KEYBYTES","crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_IETF_NPUBBYTES","crypto_aead_xchacha20poly1305_IETF_NSECBYTES","crypto_aead_xchacha20poly1305_ietf_ABYTES","crypto_aead_xchacha20poly1305_ietf_KEYBYTES","crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX","crypto_aead_xchacha20poly1305_ietf_NPUBBYTES","crypto_aead_xchacha20poly1305_ietf_NSECBYTES","crypto_auth_BYTES","crypto_auth_KEYBYTES","crypto_auth_hmacsha256_BYTES","crypto_auth_hmacsha256_KEYBYTES","crypto_auth_hmacsha512256_BYTES","crypto_auth_hmacsha512256_KEYBYTES","crypto_auth_hmacsha512_BYTES","crypto_auth_hmacsha512_KEYBYTES","crypto_box_BEFORENMBYTES","crypto_box_MACBYTES","crypto_box_MESSAGEBYTES_MAX","crypto_box_NONCEBYTES","crypto_box_PUBLICKEYBYTES","crypto_box_SEALBYTES","crypto_box_SECRETKEYBYTES","crypto_box_SEEDBYTES","crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES","crypto_box_curve25519xchacha20poly1305_MACBYTES","crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xchacha20poly1305_NONCEBYTES","crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEALBYTES","crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES","crypto_box_curve25519xchacha20poly1305_SEEDBYTES","crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES","crypto_box_curve25519xsalsa20poly1305_MACBYTES","crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_box_curve25519xsalsa20poly1305_NONCEBYTES","crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES","crypto_box_curve25519xsalsa20poly1305_SEEDBYTES","crypto_core_ed25519_BYTES","crypto_core_ed25519_HASHBYTES","crypto_core_ed25519_NONREDUCEDSCALARBYTES","crypto_core_ed25519_SCALARBYTES","crypto_core_ed25519_UNIFORMBYTES","crypto_core_hchacha20_CONSTBYTES","crypto_core_hchacha20_INPUTBYTES","crypto_core_hchacha20_KEYBYTES","crypto_core_hchacha20_OUTPUTBYTES","crypto_core_hsalsa20_CONSTBYTES","crypto_core_hsalsa20_INPUTBYTES","crypto_core_hsalsa20_KEYBYTES","crypto_core_hsalsa20_OUTPUTBYTES","crypto_core_ristretto255_BYTES","crypto_core_ristretto255_HASHBYTES","crypto_core_ristretto255_NONREDUCEDSCALARBYTES","crypto_core_ristretto255_SCALARBYTES","crypto_core_salsa2012_CONSTBYTES","crypto_core_salsa2012_INPUTBYTES","crypto_core_salsa2012_KEYBYTES","crypto_core_salsa2012_OUTPUTBYTES","crypto_core_salsa208_CONSTBYTES","crypto_core_salsa208_INPUTBYTES","crypto_core_salsa208_KEYBYTES","crypto_core_salsa208_OUTPUTBYTES","crypto_core_salsa20_CONSTBYTES","crypto_core_salsa20_INPUTBYTES","crypto_core_salsa20_KEYBYTES","crypto_core_salsa20_OUTPUTBYTES","crypto_generichash_BYTES","crypto_generichash_BYTES_MAX","crypto_generichash_BYTES_MIN","crypto_generichash_KEYBYTES","crypto_generichash_KEYBYTES_MAX","crypto_generichash_KEYBYTES_MIN","crypto_generichash_blake2b_BYTES","crypto_generichash_blake2b_BYTES_MAX","crypto_generichash_blake2b_BYTES_MIN","crypto_generichash_blake2b_KEYBYTES","crypto_generichash_blake2b_KEYBYTES_MAX","crypto_generichash_blake2b_KEYBYTES_MIN","crypto_generichash_blake2b_PERSONALBYTES","crypto_generichash_blake2b_SALTBYTES","crypto_hash_BYTES","crypto_hash_sha256_BYTES","crypto_hash_sha512_BYTES","crypto_ipcrypt_BYTES","crypto_ipcrypt_KEYBYTES","crypto_ipcrypt_NDX_INPUTBYTES","crypto_ipcrypt_NDX_KEYBYTES","crypto_ipcrypt_NDX_OUTPUTBYTES","crypto_ipcrypt_NDX_TWEAKBYTES","crypto_ipcrypt_ND_INPUTBYTES","crypto_ipcrypt_ND_KEYBYTES","crypto_ipcrypt_ND_OUTPUTBYTES","crypto_ipcrypt_ND_TWEAKBYTES","crypto_ipcrypt_PFX_BYTES","crypto_ipcrypt_PFX_KEYBYTES","crypto_kdf_BYTES_MAX","crypto_kdf_BYTES_MIN","crypto_kdf_CONTEXTBYTES","crypto_kdf_KEYBYTES","crypto_kdf_blake2b_BYTES_MAX","crypto_kdf_blake2b_BYTES_MIN","crypto_kdf_blake2b_CONTEXTBYTES","crypto_kdf_blake2b_KEYBYTES","crypto_kdf_hkdf_sha256_BYTES_MAX","crypto_kdf_hkdf_sha256_BYTES_MIN","crypto_kdf_hkdf_sha256_KEYBYTES","crypto_kdf_hkdf_sha512_BYTES_MAX","crypto_kdf_hkdf_sha512_BYTES_MIN","crypto_kdf_hkdf_sha512_KEYBYTES","crypto_kx_PUBLICKEYBYTES","crypto_kx_SECRETKEYBYTES","crypto_kx_SEEDBYTES","crypto_kx_SESSIONKEYBYTES","crypto_onetimeauth_BYTES","crypto_onetimeauth_KEYBYTES","crypto_onetimeauth_poly1305_BYTES","crypto_onetimeauth_poly1305_KEYBYTES","crypto_pwhash_ALG_ARGON2I13","crypto_pwhash_ALG_ARGON2ID13","crypto_pwhash_ALG_DEFAULT","crypto_pwhash_BYTES_MAX","crypto_pwhash_BYTES_MIN","crypto_pwhash_MEMLIMIT_INTERACTIVE","crypto_pwhash_MEMLIMIT_MAX","crypto_pwhash_MEMLIMIT_MIN","crypto_pwhash_MEMLIMIT_MODERATE","crypto_pwhash_MEMLIMIT_SENSITIVE","crypto_pwhash_OPSLIMIT_INTERACTIVE","crypto_pwhash_OPSLIMIT_MAX","crypto_pwhash_OPSLIMIT_MIN","crypto_pwhash_OPSLIMIT_MODERATE","crypto_pwhash_OPSLIMIT_SENSITIVE","crypto_pwhash_PASSWD_MAX","crypto_pwhash_PASSWD_MIN","crypto_pwhash_SALTBYTES","crypto_pwhash_STRBYTES","crypto_pwhash_argon2i_BYTES_MAX","crypto_pwhash_argon2i_BYTES_MIN","crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2i_MEMLIMIT_MAX","crypto_pwhash_argon2i_MEMLIMIT_MIN","crypto_pwhash_argon2i_MEMLIMIT_MODERATE","crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2i_OPSLIMIT_MAX","crypto_pwhash_argon2i_OPSLIMIT_MIN","crypto_pwhash_argon2i_OPSLIMIT_MODERATE","crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2i_PASSWD_MAX","crypto_pwhash_argon2i_PASSWD_MIN","crypto_pwhash_argon2i_SALTBYTES","crypto_pwhash_argon2i_STRBYTES","crypto_pwhash_argon2id_BYTES_MAX","crypto_pwhash_argon2id_BYTES_MIN","crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE","crypto_pwhash_argon2id_MEMLIMIT_MAX","crypto_pwhash_argon2id_MEMLIMIT_MIN","crypto_pwhash_argon2id_MEMLIMIT_MODERATE","crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE","crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE","crypto_pwhash_argon2id_OPSLIMIT_MAX","crypto_pwhash_argon2id_OPSLIMIT_MIN","crypto_pwhash_argon2id_OPSLIMIT_MODERATE","crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE","crypto_pwhash_argon2id_PASSWD_MAX","crypto_pwhash_argon2id_PASSWD_MIN","crypto_pwhash_argon2id_SALTBYTES","crypto_pwhash_argon2id_STRBYTES","crypto_pwhash_scryptsalsa208sha256_BYTES_MAX","crypto_pwhash_scryptsalsa208sha256_BYTES_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN","crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE","crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX","crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN","crypto_pwhash_scryptsalsa208sha256_SALTBYTES","crypto_pwhash_scryptsalsa208sha256_STRBYTES","crypto_scalarmult_BYTES","crypto_scalarmult_SCALARBYTES","crypto_scalarmult_curve25519_BYTES","crypto_scalarmult_curve25519_SCALARBYTES","crypto_scalarmult_ed25519_BYTES","crypto_scalarmult_ed25519_SCALARBYTES","crypto_scalarmult_ristretto255_BYTES","crypto_scalarmult_ristretto255_SCALARBYTES","crypto_secretbox_KEYBYTES","crypto_secretbox_MACBYTES","crypto_secretbox_MESSAGEBYTES_MAX","crypto_secretbox_NONCEBYTES","crypto_secretbox_xchacha20poly1305_KEYBYTES","crypto_secretbox_xchacha20poly1305_MACBYTES","crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xchacha20poly1305_NONCEBYTES","crypto_secretbox_xsalsa20poly1305_KEYBYTES","crypto_secretbox_xsalsa20poly1305_MACBYTES","crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX","crypto_secretbox_xsalsa20poly1305_NONCEBYTES","crypto_secretstream_xchacha20poly1305_ABYTES","crypto_secretstream_xchacha20poly1305_HEADERBYTES","crypto_secretstream_xchacha20poly1305_KEYBYTES","crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX","crypto_secretstream_xchacha20poly1305_TAG_FINAL","crypto_secretstream_xchacha20poly1305_TAG_MESSAGE","crypto_secretstream_xchacha20poly1305_TAG_PUSH","crypto_secretstream_xchacha20poly1305_TAG_REKEY","crypto_shorthash_BYTES","crypto_shorthash_KEYBYTES","crypto_shorthash_siphash24_BYTES","crypto_shorthash_siphash24_KEYBYTES","crypto_shorthash_siphashx24_BYTES","crypto_shorthash_siphashx24_KEYBYTES","crypto_sign_BYTES","crypto_sign_MESSAGEBYTES_MAX","crypto_sign_PUBLICKEYBYTES","crypto_sign_SECRETKEYBYTES","crypto_sign_SEEDBYTES","crypto_sign_ed25519_BYTES","crypto_sign_ed25519_MESSAGEBYTES_MAX","crypto_sign_ed25519_PUBLICKEYBYTES","crypto_sign_ed25519_SECRETKEYBYTES","crypto_sign_ed25519_SEEDBYTES","crypto_stream_KEYBYTES","crypto_stream_MESSAGEBYTES_MAX","crypto_stream_NONCEBYTES","crypto_stream_chacha20_IETF_KEYBYTES","crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX","crypto_stream_chacha20_IETF_NONCEBYTES","crypto_stream_chacha20_KEYBYTES","crypto_stream_chacha20_MESSAGEBYTES_MAX","crypto_stream_chacha20_NONCEBYTES","crypto_stream_chacha20_ietf_KEYBYTES","crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX","crypto_stream_chacha20_ietf_NONCEBYTES","crypto_stream_salsa2012_KEYBYTES","crypto_stream_salsa2012_MESSAGEBYTES_MAX","crypto_stream_salsa2012_NONCEBYTES","crypto_stream_salsa208_KEYBYTES","crypto_stream_salsa208_MESSAGEBYTES_MAX","crypto_stream_salsa208_NONCEBYTES","crypto_stream_salsa20_KEYBYTES","crypto_stream_salsa20_MESSAGEBYTES_MAX","crypto_stream_salsa20_NONCEBYTES","crypto_stream_xchacha20_KEYBYTES","crypto_stream_xchacha20_MESSAGEBYTES_MAX","crypto_stream_xchacha20_NONCEBYTES","crypto_stream_xsalsa20_KEYBYTES","crypto_stream_xsalsa20_MESSAGEBYTES_MAX","crypto_stream_xsalsa20_NONCEBYTES","crypto_verify_16_BYTES","crypto_verify_32_BYTES","crypto_verify_64_BYTES","crypto_xof_shake128_BLOCKBYTES","crypto_xof_shake128_STATEBYTES","crypto_xof_shake256_BLOCKBYTES","crypto_xof_shake256_STATEBYTES","crypto_xof_turboshake128_BLOCKBYTES","crypto_xof_turboshake128_STATEBYTES","crypto_xof_turboshake256_BLOCKBYTES","crypto_xof_turboshake256_STATEBYTES"];for(_=0;_<n.length;_++)"function"==typeof(c=t["_"+n[_].toLowerCase()])&&(e[n[_]]=c());var s=["SODIUM_VERSION_STRING","crypto_pwhash_STRPREFIX","crypto_pwhash_argon2i_STRPREFIX","crypto_pwhash_argon2id_STRPREFIX","crypto_pwhash_scryptsalsa208sha256_STRPREFIX"];for(_=0;_<s.length;_++){var c;"function"==typeof(c=t["_"+s[_].toLowerCase()])&&(e[s[_]]=t.UTF8ToString(c()))}}t=r;try{a();var _=new Uint8Array([98,97,108,108,115]),n=e.randombytes_buf(e.crypto_secretbox_NONCEBYTES),s=e.randombytes_buf(e.crypto_secretbox_KEYBYTES),c=e.crypto_secretbox_easy(_,n,s),o=e.crypto_secretbox_open_easy(c,n,s);if(e.memcmp(_,o))return}catch(e){if(null==t.useBackupModule)throw new Error("Both wasm and asm failed to load"+e)}t.useBackupModule(),a()});function _(e){if("function"==typeof TextEncoder)return(new TextEncoder).encode(e);e=unescape(encodeURIComponent(e));for(var r=new Uint8Array(e.length),t=0,a=e.length;t<a;t++)r[t]=e.charCodeAt(t);return r}function n(e){if("function"==typeof TextDecoder)return new TextDecoder("utf-8",{fatal:!0}).decode(e);var r=8192,t=Math.ceil(e.length/r);if(t<=1)try{return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}catch(e){throw new TypeError("The encoded data was not valid.")}for(var a="",_=0,s=0;s<t;s++){var c=Array.prototype.slice.call(e,s*r+_,(s+1)*r+_);if(0!==c.length){var o,p=c.length,h=0;do{var y=c[--p];y>=240?(h=4,o=!0):y>=224?(h=3,o=!0):y>=192?(h=2,o=!0):y<128&&(h=1,o=!0)}while(!o);for(var i=h-(c.length-p),l=0;l<i;l++)_--,c.pop();a+=n(c)}}return a}function s(e){e=x(null,e,"input");for(var r,t,a,_="",n=0;n<e.length;n++)a=87+(t=15&e[n])+(t-10>>8&-39)<<8|87+(r=e[n]>>>4)+(r-10>>8&-39),_+=String.fromCharCode(255&a)+String.fromCharCode(a>>>8);return _}var c={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function o(e){if(void 0===e)return c.URLSAFE_NO_PADDING;if(e!==c.ORIGINAL&&e!==c.ORIGINAL_NO_PADDING&&e!==c.URLSAFE&&e!==c.URLSAFE_NO_PADDING)throw new Error("unsupported base64 variant");return e}function p(e,r){r=o(r);var a=[];e=x(a,e,"input");var _,s=0|Math.floor(e.length/3),c=e.length-3*s,p=4*s+(0!==c?2&r?2+(c>>>1):4:0),h=new l(p+1),y=u(e);return a.push(y),a.push(h.address),0===t._sodium_bin2base64(h.address,h.length,y,e.length,r)&&b(a,"conversion failed"),h.length=p,_=n(h.to_Uint8Array()),g(a),_}function h(e,r){var t=r||"uint8array";if(!y(t))throw new Error(t+" output format is not available");if(e instanceof l){if("uint8array"===t)return e.to_Uint8Array();if("text"===t)return n(e.to_Uint8Array());if("hex"===t)return s(e.to_Uint8Array());if("base64"===t)return p(e.to_Uint8Array(),c.URLSAFE_NO_PADDING);throw new Error('What is output format "'+t+'"?')}if("object"==typeof e){for(var a=Object.keys(e),_={},o=0;o<a.length;o++)_[a[o]]=h(e[a[o]],t);return _}if("string"==typeof e)return e;throw new TypeError("Cannot format output")}function y(e){for(var r=["uint8array","text","hex","base64"],t=0;t<r.length;t++)if(r[t]===e)return!0;return!1}function i(e){if(e){if("string"!=typeof e)throw new TypeError("When defined, the output format must be a string");if(!y(e))throw new Error(e+" is not a supported output format")}}function l(e){this.length=e,this.address=d(e)}function u(e){var r=d(e.length);return t.HEAPU8.set(e,r),r}function d(e){var r=t._malloc(e);if(0===r)throw{message:"_malloc() failed",length:e};return r}function v(e){t._free(e)}function g(e){if(e)for(var r=0;r<e.length;r++)v(e[r])}function b(e,r){throw g(e),new Error(r)}function f(e,r){throw g(e),new TypeError(r)}function m(e,r,t){null==r&&f(e,t+" cannot be null or undefined")}function x(e,r,t){return m(e,r,t),r instanceof Uint8Array?r:"string"==typeof r?_(r):void f(e,"unsupported input type for "+t)}function E(e,r,a,_,n,s){var c=[];i(s);var o=null;null!=e&&(o=u(e=x(c,e,"secret_nonce")),e.length,c.push(o)),r=x(c,r,"ciphertext");var p,y=t._crypto_aead_aegis128l_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),p=u(r),c.push(p);var v=null,m=0;null!=a&&(v=u(a=x(c,a,"additional_data")),m=a.length,c.push(v)),_=x(c,_,"public_nonce");var E,k=0|t._crypto_aead_aegis128l_npubbytes();_.length!==k&&f(c,"invalid public_nonce length"),E=u(_),c.push(E),n=x(c,n,"key");var S,T=0|t._crypto_aead_aegis128l_keybytes();n.length!==T&&f(c,"invalid key length"),S=u(n),c.push(S);var w=new l(d-t._crypto_aead_aegis128l_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_aegis128l_decrypt(Y,null,o,p,d,0,v,m,0,E,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function k(e,r,a,_,n,s,c){var o=[];i(c);var p=null;null!=e&&(p=u(e=x(o,e,"secret_nonce")),e.length,o.push(p));var y=u(r=x(o,r,"ciphertext")),d=r.length;o.push(y),a=x(o,a,"mac");var v,m=0|t._crypto_aead_aegis128l_abytes();a.length!==m&&f(o,"invalid mac length"),v=u(a),o.push(v);var E=null,k=0;null!=_&&(E=u(_=x(o,_,"additional_data")),k=_.length,o.push(E)),n=x(o,n,"public_nonce");var S,T=0|t._crypto_aead_aegis128l_npubbytes();n.length!==T&&f(o,"invalid public_nonce length"),S=u(n),o.push(S),s=x(o,s,"key");var w,Y=0|t._crypto_aead_aegis128l_keybytes();s.length!==Y&&f(o,"invalid key length"),w=u(s),o.push(w);var B=new l(0|d),A=B.address;if(o.push(A),0===t._crypto_aead_aegis128l_decrypt_detached(A,p,y,d,0,v,E,k,0,S,w)){var M=h(B,c);return g(o),M}b(o,"ciphertext cannot be decrypted using that key")}function S(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_aegis128l_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_aegis128l_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(p+t._crypto_aead_aegis128l_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_aegis128l_encrypt(w,null,o,p,0,y,d,0,v,m,k)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function T(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_aegis128l_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_aegis128l_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(0|p),w=T.address;c.push(w);var Y=new l(0|t._crypto_aead_aegis128l_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_aegis128l_encrypt_detached(w,B,null,o,p,0,y,d,0,v,m,k)){var A=h({ciphertext:T,mac:Y},s);return g(c),A}b(c,"invalid usage")}function w(e){var r=[];i(e);var a=new l(0|t._crypto_aead_aegis128l_keybytes()),_=a.address;r.push(_),t._crypto_aead_aegis128l_keygen(_);var n=h(a,e);return g(r),n}function Y(e,r,a,_,n,s){var c=[];i(s);var o=null;null!=e&&(o=u(e=x(c,e,"secret_nonce")),e.length,c.push(o)),r=x(c,r,"ciphertext");var p,y=t._crypto_aead_aegis256_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),p=u(r),c.push(p);var v=null,m=0;null!=a&&(v=u(a=x(c,a,"additional_data")),m=a.length,c.push(v)),_=x(c,_,"public_nonce");var E,k=0|t._crypto_aead_aegis256_npubbytes();_.length!==k&&f(c,"invalid public_nonce length"),E=u(_),c.push(E),n=x(c,n,"key");var S,T=0|t._crypto_aead_aegis256_keybytes();n.length!==T&&f(c,"invalid key length"),S=u(n),c.push(S);var w=new l(d-t._crypto_aead_aegis256_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_aegis256_decrypt(Y,null,o,p,d,0,v,m,0,E,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function B(e,r,a,_,n,s,c){var o=[];i(c);var p=null;null!=e&&(p=u(e=x(o,e,"secret_nonce")),e.length,o.push(p));var y=u(r=x(o,r,"ciphertext")),d=r.length;o.push(y),a=x(o,a,"mac");var v,m=0|t._crypto_aead_aegis256_abytes();a.length!==m&&f(o,"invalid mac length"),v=u(a),o.push(v);var E=null,k=0;null!=_&&(E=u(_=x(o,_,"additional_data")),k=_.length,o.push(E)),n=x(o,n,"public_nonce");var S,T=0|t._crypto_aead_aegis256_npubbytes();n.length!==T&&f(o,"invalid public_nonce length"),S=u(n),o.push(S),s=x(o,s,"key");var w,Y=0|t._crypto_aead_aegis256_keybytes();s.length!==Y&&f(o,"invalid key length"),w=u(s),o.push(w);var B=new l(0|d),A=B.address;if(o.push(A),0===t._crypto_aead_aegis256_decrypt_detached(A,p,y,d,0,v,E,k,0,S,w)){var M=h(B,c);return g(o),M}b(o,"ciphertext cannot be decrypted using that key")}function A(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_aegis256_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_aegis256_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(p+t._crypto_aead_aegis256_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_aegis256_encrypt(w,null,o,p,0,y,d,0,v,m,k)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function M(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_aegis256_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_aegis256_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(0|p),w=T.address;c.push(w);var Y=new l(0|t._crypto_aead_aegis256_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_aegis256_encrypt_detached(w,B,null,o,p,0,y,d,0,v,m,k)){var A=h({ciphertext:T,mac:Y},s);return g(c),A}b(c,"invalid usage")}function I(e){var r=[];i(e);var a=new l(0|t._crypto_aead_aegis256_keybytes()),_=a.address;r.push(_),t._crypto_aead_aegis256_keygen(_);var n=h(a,e);return g(r),n}function K(e,r,a,_,n,s){var c=[];i(s);var o=null;null!=e&&(o=u(e=x(c,e,"secret_nonce")),e.length,c.push(o)),r=x(c,r,"ciphertext");var p,y=t._crypto_aead_chacha20poly1305_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),p=u(r),c.push(p);var v=null,m=0;null!=a&&(v=u(a=x(c,a,"additional_data")),m=a.length,c.push(v)),_=x(c,_,"public_nonce");var E,k=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==k&&f(c,"invalid public_nonce length"),E=u(_),c.push(E),n=x(c,n,"key");var S,T=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==T&&f(c,"invalid key length"),S=u(n),c.push(S);var w=new l(d-t._crypto_aead_chacha20poly1305_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_chacha20poly1305_decrypt(Y,null,o,p,d,0,v,m,0,E,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function N(e,r,a,_,n,s,c){var o=[];i(c);var p=null;null!=e&&(p=u(e=x(o,e,"secret_nonce")),e.length,o.push(p));var y=u(r=x(o,r,"ciphertext")),d=r.length;o.push(y),a=x(o,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(o,"invalid mac length"),v=u(a),o.push(v);var E=null,k=0;null!=_&&(E=u(_=x(o,_,"additional_data")),k=_.length,o.push(E)),n=x(o,n,"public_nonce");var S,T=0|t._crypto_aead_chacha20poly1305_npubbytes();n.length!==T&&f(o,"invalid public_nonce length"),S=u(n),o.push(S),s=x(o,s,"key");var w,Y=0|t._crypto_aead_chacha20poly1305_keybytes();s.length!==Y&&f(o,"invalid key length"),w=u(s),o.push(w);var B=new l(0|d),A=B.address;if(o.push(A),0===t._crypto_aead_chacha20poly1305_decrypt_detached(A,p,y,d,0,v,E,k,0,S,w)){var M=h(B,c);return g(o),M}b(o,"ciphertext cannot be decrypted using that key")}function L(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(p+t._crypto_aead_chacha20poly1305_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_chacha20poly1305_encrypt(w,null,o,p,0,y,d,0,v,m,k)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function O(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_chacha20poly1305_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_chacha20poly1305_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(0|p),w=T.address;c.push(w);var Y=new l(0|t._crypto_aead_chacha20poly1305_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_chacha20poly1305_encrypt_detached(w,B,null,o,p,0,y,d,0,v,m,k)){var A=h({ciphertext:T,mac:Y},s);return g(c),A}b(c,"invalid usage")}function U(e,r,a,_,n,s){var c=[];i(s);var o=null;null!=e&&(o=u(e=x(c,e,"secret_nonce")),e.length,c.push(o)),r=x(c,r,"ciphertext");var p,y=t._crypto_aead_chacha20poly1305_ietf_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),p=u(r),c.push(p);var v=null,m=0;null!=a&&(v=u(a=x(c,a,"additional_data")),m=a.length,c.push(v)),_=x(c,_,"public_nonce");var E,k=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==k&&f(c,"invalid public_nonce length"),E=u(_),c.push(E),n=x(c,n,"key");var S,T=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==T&&f(c,"invalid key length"),S=u(n),c.push(S);var w=new l(d-t._crypto_aead_chacha20poly1305_ietf_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_chacha20poly1305_ietf_decrypt(Y,null,o,p,d,0,v,m,0,E,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function P(e,r,a,_,n,s,c){var o=[];i(c);var p=null;null!=e&&(p=u(e=x(o,e,"secret_nonce")),e.length,o.push(p));var y=u(r=x(o,r,"ciphertext")),d=r.length;o.push(y),a=x(o,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(o,"invalid mac length"),v=u(a),o.push(v);var E=null,k=0;null!=_&&(E=u(_=x(o,_,"additional_data")),k=_.length,o.push(E)),n=x(o,n,"public_nonce");var S,T=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();n.length!==T&&f(o,"invalid public_nonce length"),S=u(n),o.push(S),s=x(o,s,"key");var w,Y=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();s.length!==Y&&f(o,"invalid key length"),w=u(s),o.push(w);var B=new l(0|d),A=B.address;if(o.push(A),0===t._crypto_aead_chacha20poly1305_ietf_decrypt_detached(A,p,y,d,0,v,E,k,0,S,w)){var M=h(B,c);return g(o),M}b(o,"ciphertext cannot be decrypted using that key")}function C(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(p+t._crypto_aead_chacha20poly1305_ietf_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_chacha20poly1305_ietf_encrypt(w,null,o,p,0,y,d,0,v,m,k)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function R(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_chacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_chacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(0|p),w=T.address;c.push(w);var Y=new l(0|t._crypto_aead_chacha20poly1305_ietf_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_chacha20poly1305_ietf_encrypt_detached(w,B,null,o,p,0,y,d,0,v,m,k)){var A=h({ciphertext:T,mac:Y},s);return g(c),A}b(c,"invalid usage")}function X(e){var r=[];i(e);var a=new l(0|t._crypto_aead_chacha20poly1305_ietf_keybytes()),_=a.address;r.push(_),t._crypto_aead_chacha20poly1305_ietf_keygen(_);var n=h(a,e);return g(r),n}function D(e){var r=[];i(e);var a=new l(0|t._crypto_aead_chacha20poly1305_keybytes()),_=a.address;r.push(_),t._crypto_aead_chacha20poly1305_keygen(_);var n=h(a,e);return g(r),n}function G(e,r,a,_,n,s){var c=[];i(s);var o=null;null!=e&&(o=u(e=x(c,e,"secret_nonce")),e.length,c.push(o)),r=x(c,r,"ciphertext");var p,y=t._crypto_aead_xchacha20poly1305_ietf_abytes(),d=r.length;d<y&&f(c,"ciphertext is too short"),p=u(r),c.push(p);var v=null,m=0;null!=a&&(v=u(a=x(c,a,"additional_data")),m=a.length,c.push(v)),_=x(c,_,"public_nonce");var E,k=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==k&&f(c,"invalid public_nonce length"),E=u(_),c.push(E),n=x(c,n,"key");var S,T=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==T&&f(c,"invalid key length"),S=u(n),c.push(S);var w=new l(d-t._crypto_aead_xchacha20poly1305_ietf_abytes()|0),Y=w.address;if(c.push(Y),0===t._crypto_aead_xchacha20poly1305_ietf_decrypt(Y,null,o,p,d,0,v,m,0,E,S)){var B=h(w,s);return g(c),B}b(c,"ciphertext cannot be decrypted using that key")}function F(e,r,a,_,n,s,c){var o=[];i(c);var p=null;null!=e&&(p=u(e=x(o,e,"secret_nonce")),e.length,o.push(p));var y=u(r=x(o,r,"ciphertext")),d=r.length;o.push(y),a=x(o,a,"mac");var v,m=0|t._crypto_box_macbytes();a.length!==m&&f(o,"invalid mac length"),v=u(a),o.push(v);var E=null,k=0;null!=_&&(E=u(_=x(o,_,"additional_data")),k=_.length,o.push(E)),n=x(o,n,"public_nonce");var S,T=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();n.length!==T&&f(o,"invalid public_nonce length"),S=u(n),o.push(S),s=x(o,s,"key");var w,Y=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();s.length!==Y&&f(o,"invalid key length"),w=u(s),o.push(w);var B=new l(0|d),A=B.address;if(o.push(A),0===t._crypto_aead_xchacha20poly1305_ietf_decrypt_detached(A,p,y,d,0,v,E,k,0,S,w)){var M=h(B,c);return g(o),M}b(o,"ciphertext cannot be decrypted using that key")}function V(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(p+t._crypto_aead_xchacha20poly1305_ietf_abytes()|0),w=T.address;if(c.push(w),0===t._crypto_aead_xchacha20poly1305_ietf_encrypt(w,null,o,p,0,y,d,0,v,m,k)){var Y=h(T,s);return g(c),Y}b(c,"invalid usage")}function q(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"message")),p=e.length;c.push(o);var y=null,d=0;null!=r&&(y=u(r=x(c,r,"additional_data")),d=r.length,c.push(y));var v=null;null!=a&&(v=u(a=x(c,a,"secret_nonce")),a.length,c.push(v)),_=x(c,_,"public_nonce");var m,E=0|t._crypto_aead_xchacha20poly1305_ietf_npubbytes();_.length!==E&&f(c,"invalid public_nonce length"),m=u(_),c.push(m),n=x(c,n,"key");var k,S=0|t._crypto_aead_xchacha20poly1305_ietf_keybytes();n.length!==S&&f(c,"invalid key length"),k=u(n),c.push(k);var T=new l(0|p),w=T.address;c.push(w);var Y=new l(0|t._crypto_aead_xchacha20poly1305_ietf_abytes()),B=Y.address;if(c.push(B),0===t._crypto_aead_xchacha20poly1305_ietf_encrypt_detached(w,B,null,o,p,0,y,d,0,v,m,k)){var A=h({ciphertext:T,mac:Y},s);return g(c),A}b(c,"invalid usage")}function z(e){var r=[];i(e);var a=new l(0|t._crypto_aead_xchacha20poly1305_ietf_keybytes()),_=a.address;r.push(_),t._crypto_aead_xchacha20poly1305_ietf_keygen(_);var n=h(a,e);return g(r),n}function W(e,r,a){var _=[];i(a);var n=u(e=x(_,e,"message")),s=e.length;_.push(n),r=x(_,r,"key");var c,o=0|t._crypto_auth_keybytes();r.length!==o&&f(_,"invalid key length"),c=u(r),_.push(c);var p=new l(0|t._crypto_auth_bytes()),y=p.address;if(_.push(y),!(0|t._crypto_auth(y,n,s,0,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function H(e,r,a){var _=[];i(a);var n=u(e=x(_,e,"message")),s=e.length;_.push(n),r=x(_,r,"key");var c,o=0|t._crypto_auth_hmacsha256_keybytes();r.length!==o&&f(_,"invalid key length"),c=u(r),_.push(c);var p=new l(0|t._crypto_auth_hmacsha256_bytes()),y=p.address;if(_.push(y),!(0|t._crypto_auth_hmacsha256(y,n,s,0,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function j(e,r){var a=[];i(r),m(a,e,"state_address");var _=new l(0|t._crypto_auth_hmacsha256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function J(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=u(e=x(a,e,"key")),n=e.length,a.push(_));var s=new l(208).address;if(!(0|t._crypto_auth_hmacsha256_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function Q(e){var r=[];i(e);var a=new l(0|t._crypto_auth_hmacsha256_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha256_keygen(_);var n=h(a,e);return g(r),n}function Z(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=u(r=x(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function $(e,r,a){var _=[];e=x(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha256_bytes();e.length!==s&&f(_,"invalid tag length"),n=u(e),_.push(n);var c=u(r=x(_,r,"message")),o=r.length;_.push(c),a=x(_,a,"key");var p,h=0|t._crypto_auth_hmacsha256_keybytes();a.length!==h&&f(_,"invalid key length"),p=u(a),_.push(p);var y=!(0|t._crypto_auth_hmacsha256_verify(n,c,o,0,p));return g(_),y}function ee(e,r,a){var _=[];i(a);var n=u(e=x(_,e,"message")),s=e.length;_.push(n),r=x(_,r,"key");var c,o=0|t._crypto_auth_hmacsha512_keybytes();r.length!==o&&f(_,"invalid key length"),c=u(r),_.push(c);var p=new l(0|t._crypto_auth_hmacsha512_bytes()),y=p.address;if(_.push(y),!(0|t._crypto_auth_hmacsha512(y,n,s,0,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function re(e,r,a){var _=[];i(a);var n=u(e=x(_,e,"message")),s=e.length;_.push(n),r=x(_,r,"key");var c,o=0|t._crypto_auth_hmacsha512256_keybytes();r.length!==o&&f(_,"invalid key length"),c=u(r),_.push(c);var p=new l(0|t._crypto_auth_hmacsha512256_bytes()),y=p.address;if(_.push(y),!(0|t._crypto_auth_hmacsha512256(y,n,s,0,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function te(e,r){var a=[];i(r),m(a,e,"state_address");var _=new l(0|t._crypto_auth_hmacsha512256_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha512256_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function ae(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=u(e=x(a,e,"key")),n=e.length,a.push(_));var s=new l(416).address;if(!(0|t._crypto_auth_hmacsha512256_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function _e(e){var r=[];i(e);var a=new l(0|t._crypto_auth_hmacsha512256_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha512256_keygen(_);var n=h(a,e);return g(r),n}function ne(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=u(r=x(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha512256_update(e,n,s)&&b(_,"invalid usage"),g(_)}function se(e,r,a){var _=[];e=x(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha512256_bytes();e.length!==s&&f(_,"invalid tag length"),n=u(e),_.push(n);var c=u(r=x(_,r,"message")),o=r.length;_.push(c),a=x(_,a,"key");var p,h=0|t._crypto_auth_hmacsha512256_keybytes();a.length!==h&&f(_,"invalid key length"),p=u(a),_.push(p);var y=!(0|t._crypto_auth_hmacsha512256_verify(n,c,o,0,p));return g(_),y}function ce(e,r){var a=[];i(r),m(a,e,"state_address");var _=new l(0|t._crypto_auth_hmacsha512_bytes()),n=_.address;if(a.push(n),!(0|t._crypto_auth_hmacsha512_final(e,n))){var s=(t._free(e),h(_,r));return g(a),s}b(a,"invalid usage")}function oe(e,r){var a=[];i(r);var _=null,n=0;null!=e&&(_=u(e=x(a,e,"key")),n=e.length,a.push(_));var s=new l(416).address;if(!(0|t._crypto_auth_hmacsha512_init(s,_,n))){var c=s;return g(a),c}b(a,"invalid usage")}function pe(e){var r=[];i(e);var a=new l(0|t._crypto_auth_hmacsha512_keybytes()),_=a.address;r.push(_),t._crypto_auth_hmacsha512_keygen(_);var n=h(a,e);return g(r),n}function he(e,r,a){var _=[];i(a),m(_,e,"state_address");var n=u(r=x(_,r,"message_chunk")),s=r.length;_.push(n),0|t._crypto_auth_hmacsha512_update(e,n,s)&&b(_,"invalid usage"),g(_)}function ye(e,r,a){var _=[];e=x(_,e,"tag");var n,s=0|t._crypto_auth_hmacsha512_bytes();e.length!==s&&f(_,"invalid tag length"),n=u(e),_.push(n);var c=u(r=x(_,r,"message")),o=r.length;_.push(c),a=x(_,a,"key");var p,h=0|t._crypto_auth_hmacsha512_keybytes();a.length!==h&&f(_,"invalid key length"),p=u(a),_.push(p);var y=!(0|t._crypto_auth_hmacsha512_verify(n,c,o,0,p));return g(_),y}function ie(e){var r=[];i(e);var a=new l(0|t._crypto_auth_keybytes()),_=a.address;r.push(_),t._crypto_auth_keygen(_);var n=h(a,e);return g(r),n}function le(e,r,a){var _=[];e=x(_,e,"tag");var n,s=0|t._crypto_auth_bytes();e.length!==s&&f(_,"invalid tag length"),n=u(e),_.push(n);var c=u(r=x(_,r,"message")),o=r.length;_.push(c),a=x(_,a,"key");var p,h=0|t._crypto_auth_keybytes();a.length!==h&&f(_,"invalid key length"),p=u(a),_.push(p);var y=!(0|t._crypto_auth_verify(n,c,o,0,p));return g(_),y}function ue(e,r,a){var _=[];i(a),e=x(_,e,"publicKey");var n,s=0|t._crypto_box_publickeybytes();e.length!==s&&f(_,"invalid publicKey length"),n=u(e),_.push(n),r=x(_,r,"privateKey");var c,o=0|t._crypto_box_secretkeybytes();r.length!==o&&f(_,"invalid privateKey length"),c=u(r),_.push(c);var p=new l(0|t._crypto_box_beforenmbytes()),y=p.address;if(_.push(y),!(0|t._crypto_box_beforenm(y,n,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function de(e,r,a){var _=[];i(a),e=x(_,e,"publicKey");var n,s=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();e.length!==s&&f(_,"invalid publicKey length"),n=u(e),_.push(n),r=x(_,r,"privateKey");var c,o=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();r.length!==o&&f(_,"invalid privateKey length"),c=u(r),_.push(c);var p=new l(0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes()),y=p.address;if(_.push(y),!(0|t._crypto_box_curve25519xchacha20poly1305_beforenm(y,n,c))){var d=h(p,a);return g(_),d}b(_,"invalid usage")}function ve(e,r,a,_,n){var s=[];i(n);var c=u(e=x(s,e,"message")),o=e.length;s.push(c),r=x(s,r,"nonce");var p,y=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==y&&f(s,"invalid nonce length"),p=u(r),s.push(p),a=x(s,a,"publicKey");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=u(a),s.push(d),_=x(s,_,"privateKey");var m,E=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();_.length!==E&&f(s,"invalid privateKey length"),m=u(_),s.push(m);var k=new l(0|o),S=k.address;s.push(S);var T=new l(0|t._crypto_box_curve25519xchacha20poly1305_macbytes()),w=T.address;if(s.push(w),!(0|t._crypto_box_curve25519xchacha20poly1305_detached(S,w,c,o,0,p,d,m))){var Y=h({ciphertext:k,mac:T},n);return g(s),Y}b(s,"invalid usage")}function ge(e,r,a,_){var n=[];i(_);var s=u(e=x(n,e,"message")),c=e.length;n.push(s),r=x(n,r,"nonce");var o,p=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==p&&f(n,"invalid nonce length"),o=u(r),n.push(o),a=x(n,a,"sharedKey");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=u(a),n.push(y);var v=new l(0|c),m=v.address;n.push(m);var E=new l(0|t._crypto_box_curve25519xchacha20poly1305_macbytes()),k=E.address;if(n.push(k),!(0|t._crypto_box_curve25519xchacha20poly1305_detached_afternm(m,k,s,c,0,o,y))){var S=h({ciphertext:v,mac:E},_);return g(n),S}b(n,"invalid usage")}function be(e,r,a,_,n){var s=[];i(n);var c=u(e=x(s,e,"message")),o=e.length;s.push(c),r=x(s,r,"nonce");var p,y=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==y&&f(s,"invalid nonce length"),p=u(r),s.push(p),a=x(s,a,"publicKey");var d,v=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();a.length!==v&&f(s,"invalid publicKey length"),d=u(a),s.push(d),_=x(s,_,"privateKey");var m,E=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();_.length!==E&&f(s,"invalid privateKey length"),m=u(_),s.push(m);var k=new l(o+t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),S=k.address;if(s.push(S),!(0|t._crypto_box_curve25519xchacha20poly1305_easy(S,c,o,0,p,d,m))){var T=h(k,n);return g(s),T}b(s,"invalid usage")}function fe(e,r,a,_){var n=[];i(_);var s=u(e=x(n,e,"message")),c=e.length;n.push(s),r=x(n,r,"nonce");var o,p=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();r.length!==p&&f(n,"invalid nonce length"),o=u(r),n.push(o),a=x(n,a,"sharedKey");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_beforenmbytes();a.length!==d&&f(n,"invalid sharedKey length"),y=u(a),n.push(y);var v=new l(c+t._crypto_box_curve25519xchacha20poly1305_macbytes()|0),m=v.address;if(n.push(m),!(0|t._crypto_box_curve25519xchacha20poly1305_easy_afternm(m,s,c,0,o,y))){var E=h(v,_);return g(n),E}b(n,"invalid usage")}function me(e){var r=[];i(e);var a=new l(0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes()),_=a.address;r.push(_);var n=new l(0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes()),s=n.address;r.push(s),t._crypto_box_curve25519xchacha20poly1305_keypair(_,s);var c=h({publicKey:a,privateKey:n,keyType:"curve25519"},e);return g(r),c}function xe(e,r,a,_,n,s){var c=[];i(s);var o=u(e=x(c,e,"ciphertext")),p=e.length;c.push(o),r=x(c,r,"mac");var y,d=0|t._crypto_box_curve25519xchacha20poly1305_macbytes();r.length!==d&&f(c,"invalid mac length"),y=u(r),c.push(y),a=x(c,a,"nonce");var v,m=0|t._crypto_box_curve25519xchacha20poly1305_noncebytes();a.length!==m&&f(c,"invalid nonce length"),v=u(a),c.push(v),_=x(c,_,"publicKey");var E,k=0|t._crypto_box_curve25519xchacha20poly1305_publickeybytes();_.length!==k&&f(c,"invalid publicKey length"),E=u(_),c.push(E),n=x(c,n,"privateKey");var S,T=0|t._crypto_box_curve25519xchacha20poly1305_secretkeybytes();n.length!==T&&f(c,"invalid privateKey length"),S=u(n),c.push(S);var w=new l(0|p),Y=w.address;if(c.push(Y),!(0|t._crypto_box_curve25519xchacha20poly1305_open_detached(Y,o,y,p,0,v,E,S))){var B=h(w,s);return g(c),B}b(c,"incorrect key pair for the given ciphertext")}function Ee(e,r,a,_,n){var s=[];i(n);var c=u(e=x(s,e,"ciphertext")),o=e.length;s.push(c),r=x(s,r,"mac");var p,y=0|t._crypto_box_curve25519xchach