1 Star 0 Fork 3.9K

Feng Lin/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.security.huks.d.ts 191.10 KB
一键复制 编辑 原始数据 按行查看 历史
openharmony_ci 提交于 2024-08-16 18:23 +08:00 . !13286 告警修改:代码过长
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit UniversalKeystoreKit
*/
import type { AsyncCallback } from './@ohos.base';
/**
* OpenHarmony Universal KeyStore
*
* @namespace huks
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* OpenHarmony Universal KeyStore
*
* @namespace huks
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
declare namespace huks {
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksResult> } callback - the callback of generateKey.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.generateKeyItem
*/
function generateKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.generateKeyItem
*/
function generateKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of generateKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of generateKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function generateKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Generate Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function generateKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;
/**
* Generate Key As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function generateKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<void>;
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksResult> } callback - the callback of deleteKey.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.deleteKeyItem
*/
function deleteKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.deleteKeyItem
*/
function deleteKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of deleteKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of deleteKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Delete Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function deleteKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;
/**
* Delete Key As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function deleteKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<void>;
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksResult> } callback - the callback of importKey.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.importKeyItem
*/
function importKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.importKeyItem
*/
function importKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of importKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of importKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of importKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
function importKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Import Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function importKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;
/**
* Import Key As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function importKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<void>;
/**
* Import Wrapped Key.
*
* @param { string } keyAlias - keyAlias indicates the name of key to be imported.
* @param { string } wrappingKeyAlias - wrappingKeyAlias indicates the name of key for wrapping the key to be imported.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of importWrappedKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Import Wrapped Key.
*
* @param { string } keyAlias - keyAlias indicates the name of key to be imported.
* @param { string } wrappingKeyAlias - wrappingKeyAlias indicates the name of key for wrapping the key to be imported.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<void> } callback - the callback of importWrappedKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
function importWrappedKeyItem(
keyAlias: string,
wrappingKeyAlias: string,
options: HuksOptions,
callback: AsyncCallback<void>
): void;
/**
* Import Wrapped Key As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the name of key to be imported.
* @param { string } wrappingKeyAlias - wrappingKeyAlias indicates the name of key for wrapping the key to be imported.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function importWrappedKeyItemAsUser(userId: number, keyAlias: string, wrappingKeyAlias: string, huksOptions: HuksOptions): Promise<void>;
/**
* Import Wrapped Key.
*
* @param { string } keyAlias - keyAlias indicates the name of key to be imported.
* @param { string } wrappingKeyAlias - wrappingKeyAlias indicates the name of key for wrapping the key to be imported.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Import Wrapped Key.
*
* @param { string } keyAlias - keyAlias indicates the name of key to be imported.
* @param { string } wrappingKeyAlias - wrappingKeyAlias indicates the name of key for wrapping the key to be imported.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000013 - queried credential does not exist
* @throws { BusinessError } 12000014 - memory is insufficient
* @throws { BusinessError } 12000015 - call service failed
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function importWrappedKeyItem(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions): Promise<void>;
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksResult> } callback - the callback of exportKey.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.exportKeyItem
*/
function exportKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.exportKeyItem
*/
function exportKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of exportKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of exportKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
function exportKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;
/**
* Export Key As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function exportKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<HuksReturnResult>;
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Export Key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function exportKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksResult> } callback - the callback of getKeyProperties.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.getKeyItemProperties
*/
function getKeyProperties(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.getKeyItemProperties
*/
function getKeyProperties(keyAlias: string, options: HuksOptions): Promise<HuksResult>;
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of getKeyItemProperties.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of getKeyItemProperties.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
function getKeyItemProperties(
keyAlias: string,
options: HuksOptions,
callback: AsyncCallback<HuksReturnResult>
): void;
/**
* Get properties of the key as user.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function getKeyItemPropertiesAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<HuksReturnResult>;
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Get properties of the key.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function getKeyItemProperties(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<boolean> } callback - the callback of isKeyExist.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.isKeyItemExist
*/
function isKeyExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<boolean> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.isKeyItemExist
*/
function isKeyExist(keyAlias: string, options: HuksOptions): Promise<boolean>;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<boolean> } callback - the callback of isKeyItemExist.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
function isKeyItemExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<boolean> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
function isKeyItemExist(keyAlias: string, options: HuksOptions): Promise<boolean>;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<boolean> } callback - the callback of isKeyItemExist.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function hasKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;
/**
* Check whether the key exists as user.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<boolean> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function hasKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<boolean>;
/**
* Check whether the key exists.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<boolean> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function hasKeyItem(keyAlias: string, options: HuksOptions): Promise<boolean>;
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksHandle> } callback - the callback of init, include the handle.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.initSession
*/
function init(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksHandle>): void;
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksHandle> } the promise returned by the function, include the handle.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.initSession
*/
function init(keyAlias: string, options: HuksOptions): Promise<HuksHandle>;
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksSessionHandle> } callback - the callback of initSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000010 - the number of sessions has reached limit
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @param { AsyncCallback<HuksSessionHandle> } callback - the callback of initSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000010 - the number of sessions has reached limit
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksSessionHandle>): void;
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksSessionHandle> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000010 - the number of sessions has reached limit
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Init Operation.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksSessionHandle> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000010 - the number of sessions has reached limit
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function initSession(keyAlias: string, options: HuksOptions): Promise<HuksSessionHandle>;
/**
* Init Operation As User.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key.
* @returns { Promise<HuksSessionHandle> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000010 - the number of sessions has reached limit
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function initSessionAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<HuksSessionHandle>;
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { Uint8Array } token - token indicates the value of token.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { AsyncCallback<HuksResult> } callback - the callback of update.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.updateSession
*/
function update(handle: number, token?: Uint8Array, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { Uint8Array } token - indicates the value of token.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.updateSession
*/
function update(handle: number, token?: Uint8Array, options: HuksOptions): Promise<HuksResult>;
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of updateSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of updateSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function updateSession(handle: number, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of updateSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of updateSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function updateSession(
handle: number,
options: HuksOptions,
token: Uint8Array,
callback: AsyncCallback<HuksReturnResult>
): void;
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Update Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the update operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function updateSession(handle: number, options: HuksOptions, token?: Uint8Array): Promise<HuksReturnResult>;
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { AsyncCallback<HuksResult> } callback - the callback of finish.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.finishSession
*/
function finish(handle: number, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.finishSession
*/
function finish(handle: number, options: HuksOptions): Promise<HuksResult>;
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of finishSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of finishSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function finishSession(handle: number, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of finishSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of finishSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function finishSession(
handle: number,
options: HuksOptions,
token: Uint8Array,
callback: AsyncCallback<HuksReturnResult>
): void;
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Finish Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the finish operation.
* @param { Uint8Array } token - token indicates the value of auth token from USER IAM service.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000007 - this credential is already invalidated permanently
* @throws { BusinessError } 12000008 - verify auth token failed
* @throws { BusinessError } 12000009 - auth token is already timeout
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function finishSession(handle: number, options: HuksOptions, token?: Uint8Array): Promise<HuksReturnResult>;
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @param { AsyncCallback<HuksResult> } callback - the callback of finishSession.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.abortSession
*/
function abort(handle: number, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @returns { Promise<HuksResult> } the promise returned by the function.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.abortSession
*/
function abort(handle: number, options: HuksOptions): Promise<HuksResult>;
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @param { AsyncCallback<void> } callback - the callback of abortSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @param { AsyncCallback<void> } callback - the callback of abortSession.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
function abortSession(handle: number, options: HuksOptions, callback: AsyncCallback<void>): void;
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Abort Operation.
*
* @param { number } handle - indicates the handle of the init operation.
* @param { HuksOptions } options - options indicates the properties of the abort operation.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 11
*/
function abortSession(handle: number, options: HuksOptions): Promise<void>;
/**
* Key Attestation. This API can be called only by system applications.
*
* @permission ohos.permission.ATTEST_KEY
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of attestKeyItem.
* @throws { BusinessError } 201 - check permission failed
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
function attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;
/**
* Key Attestation As User.
*
* @permission ohos.permission.ATTEST_KEY and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key attestation operation.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.ATTEST_KEY or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function attestKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<HuksReturnResult>;
/**
* Key Attestation. This API can be called only by system applications.
*
* @permission ohos.permission.ATTEST_KEY
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 201 - check permission failed
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
function attestKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;
/**
* Key Attestation with anonymous certificate.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of attestKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key Attestation with anonymous certificate.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @param { AsyncCallback<HuksReturnResult> } callback - the callback of attestKeyItem.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function anonAttestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;
/**
* Key Attestation with anonymous certificate as user.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } userId - userId indicates the userId of the owner of the key.
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } huksOptions - huksOptions indicates the properties of the key attestation operation.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied. An attempt was made to use key as user forbidden by permission:
* <br>ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS.
* @throws { BusinessError } 202 - not system app
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @systemapi this method can be used only by system applications.
* @since 12
*/
function anonAttestKeyItemAsUser(userId: number, keyAlias: string, huksOptions: HuksOptions): Promise<HuksReturnResult>;
/**
* Key Attestation with anonymous certificate.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key Attestation with anonymous certificate.
*
* @param { string } keyAlias - keyAlias indicates the key's name.
* @param { HuksOptions } options - options indicates the properties of the key attestation operation.
* @returns { Promise<HuksReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 801 - api is not supported
* @throws { BusinessError } 12000001 - algorithm mode is not supported
* @throws { BusinessError } 12000002 - algorithm param is missing
* @throws { BusinessError } 12000003 - algorithm param is invalid
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000006 - error occurred in crypto engine
* @throws { BusinessError } 12000011 - queried entity does not exist
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function anonAttestKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;
/**
* Get the sdk version.
*
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { string } the character string of the sdk version.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 11
*/
function getSdkVersion(options: HuksOptions): string;
/**
* list the key aliases.
*
* @param { HuksOptions } options - options indicates the properties of the key.
* @returns { Promise<HuksListAliasesReturnResult> } the promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified.
* 2. Incorrect parameter types.
* 3. Parameter verification failed.
* @throws { BusinessError } 12000004 - operating file failed
* @throws { BusinessError } 12000005 - IPC communication failed
* @throws { BusinessError } 12000012 - external error
* @throws { BusinessError } 12000014 - memory is insufficient
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
function listAliases(options: HuksOptions): Promise<HuksListAliasesReturnResult>;
/**
* Interface of huks param.
*
* @typedef HuksParam
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Interface of huks param.
*
* @typedef HuksParam
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export interface HuksParam {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @type { HuksTag }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
tag: HuksTag;
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @type { boolean | number | bigint | Uint8Array }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
value: boolean | number | bigint | Uint8Array;
}
/**
* Interface of huks handle.
*
* @typedef HuksHandle
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.HuksSessionHandle
*/
export interface HuksHandle {
/**
* @type { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
errorCode: number;
/**
* @type { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
handle: number;
/**
* @type { ?Uint8Array }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
token?: Uint8Array;
}
/**
* Interface of huks handle.
*
* @typedef HuksSessionHandle
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Interface of huks handle.
*
* @typedef HuksSessionHandle
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export interface HuksSessionHandle {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @type { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
handle: number;
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @type { ?Uint8Array }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
challenge?: Uint8Array;
}
/**
* Interface of huks option.
*
* @typedef HuksOptions
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Interface of huks option.
*
* @typedef HuksOptions
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export interface HuksOptions {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @type { ?Array<HuksParam> }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
properties?: Array<HuksParam>;
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @type { ?Uint8Array }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
inData?: Uint8Array;
}
/**
* Interface of huks result.
*
* @typedef HuksResult
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.HuksReturnResult
*/
export interface HuksResult {
/**
* @type { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
errorCode: number;
/**
* @type { ?Uint8Array }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
outData?: Uint8Array;
/**
* @type { ?Array<HuksParam> }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
properties?: Array<HuksParam>;
/**
* @type { ?Array<string> }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
certChains?: Array<string>;
}
/**
* Interface of huks result.
*
* @typedef HuksReturnResult
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Interface of huks result.
*
* @typedef HuksReturnResult
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export interface HuksReturnResult {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @type { ?Uint8Array }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
outData?: Uint8Array;
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @type { ?Array<HuksParam> }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
properties?: Array<HuksParam>;
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @type { ?Array<string> }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
certChains?: Array<string>;
}
/**
* Interface of huks ListAliases result.
*
* @typedef HuksListAliasesReturnResult
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export interface HuksListAliasesReturnResult {
/**
* the returned list of key aliases
*
* @type { Array<string> }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
keyAliases: Array<string>;
}
/**
* Enum for huks error code.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
* @useinstead ohos.security.huks.HuksExceptionErrCode
*/
export enum HuksErrorCode {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_SUCCESS = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_FAILURE = -1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_BAD_STATE = -2,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_ARGUMENT = -3,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_NOT_SUPPORTED = -4,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_NO_PERMISSION = -5,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INSUFFICIENT_DATA = -6,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_BUFFER_TOO_SMALL = -7,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INSUFFICIENT_MEMORY = -8,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_COMMUNICATION_FAILURE = -9,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_STORAGE_FAILURE = -10,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_HARDWARE_FAILURE = -11,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_ALREADY_EXISTS = -12,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_NOT_EXIST = -13,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_NULL_POINTER = -14,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_FILE_SIZE_FAIL = -15,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_READ_FILE_FAIL = -16,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_PUBLIC_KEY = -17,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_PRIVATE_KEY = -18,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_KEY_INFO = -19,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_HASH_NOT_EQUAL = -20,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_MALLOC_FAIL = -21,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_WRITE_FILE_FAIL = -22,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_REMOVE_FILE_FAIL = -23,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_OPEN_FILE_FAIL = -24,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CLOSE_FILE_FAIL = -25,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_MAKE_DIR_FAIL = -26,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_KEY_FILE = -27,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_IPC_MSG_FAIL = -28,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_REQUEST_OVERFLOWS = -29,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_PARAM_NOT_EXIST = -30,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CRYPTO_ENGINE_ERROR = -31,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_COMMUNICATION_TIMEOUT = -32,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_IPC_INIT_FAIL = -33,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_IPC_DLOPEN_FAIL = -34,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_EFUSE_READ_FAIL = -35,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_NEW_ROOT_KEY_MATERIAL_EXIST = -36,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_UPDATE_ROOT_KEY_MATERIAL_FAIL = -37,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_VERIFICATION_FAILED = -38,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_ALG_FAIL = -100,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_KEY_SIZE_FAIL = -101,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_PADDING_FAIL = -102,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_PURPOSE_FAIL = -103,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_DIGEST_FAIL = -104,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_MODE_FAIL = -105,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_NONCE_FAIL = -106,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_AAD_FAIL = -107,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_IV_FAIL = -108,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_AE_TAG_FAIL = -109,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_SALT_FAIL = -110,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_CHECK_GET_ITERATION_FAIL = -111,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_ALGORITHM = -112,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_KEY_SIZE = -113,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_PADDING = -114,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_PURPOSE = -115,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_MODE = -116,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_DIGEST = -117,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_SIGNATURE_SIZE = -118,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_IV = -119,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_AAD = -120,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_NONCE = -121,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_AE_TAG = -122,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_SALT = -123,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_ITERATION = -124,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INVALID_OPERATION = -125,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_INTERNAL_ERROR = -999,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_ERROR_UNKNOWN_ERROR = -1000
}
/**
* Enum for huks exception error code.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* Enum for huks exception error code.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksExceptionErrCode {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_PERMISSION_FAIL = 201,
/**
* Non-system applications are not allowed to use system APIs.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 12
*/
HUKS_ERR_CODE_NOT_SYSTEM_APP = 202,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_NOT_SUPPORTED_API = 801,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED = 12000001,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT = 12000002,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT = 12000003,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_FILE_OPERATION_FAIL = 12000004,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_COMMUNICATION_FAIL = 12000005,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_CRYPTO_FAIL = 12000006,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED = 12000007,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED = 12000008,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_KEY_AUTH_TIME_OUT = 12000009,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_SESSION_LIMIT = 12000010,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_ITEM_NOT_EXIST = 12000011,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_EXTERNAL_ERROR = 12000012,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_INSUFFICIENT_MEMORY = 12000014,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015,
/**
* A device password is required but not set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* A device password is required but not set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016
}
/**
* Enum for huks key purpose.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key purpose.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksKeyPurpose {
/**
* Usable with RSA, EC and AES keys.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Usable with RSA, EC and AES keys.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_KEY_PURPOSE_ENCRYPT = 1,
/**
* Usable with RSA, EC and AES keys.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Usable with RSA, EC and AES keys.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_KEY_PURPOSE_DECRYPT = 2,
/**
* Usable with RSA, EC keys.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with RSA, EC keys.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_SIGN = 4,
/**
* Usable with RSA, EC keys.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with RSA, EC keys.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_VERIFY = 8,
/**
* Usable with EC keys.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with EC keys.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_DERIVE = 16,
/**
* Usable with wrap key.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with wrap key.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_WRAP = 32,
/**
* Usable with unwrap key.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with unwrap key.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_UNWRAP = 64,
/**
* Usable with mac.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with mac.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_MAC = 128,
/**
* Usable with agree.
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Usable with agree.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_PURPOSE_AGREE = 256
}
/**
* Enum for huks key digest.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Enum for huks key digest.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksKeyDigest {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_NONE = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_MD5 = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SM3 = 2,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SHA1 = 10,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SHA224 = 11,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SHA256 = 12,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SHA384 = 13,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DIGEST_SHA512 = 14
}
/**
* Enum for huks key padding.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key padding.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksKeyPadding {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_PADDING_NONE = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_OAEP = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_PSS = 2,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_PKCS1_V1_5 = 3,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_PKCS5 = 4,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_PKCS7 = 5,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_ISO_IEC_9796_2 = 6,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_PADDING_ISO_IEC_9797_1 = 7,
}
/**
* Enum for huks cipher mode.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks cipher mode.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksCipherMode {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_ECB = 1,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_CBC = 2,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_CTR = 3,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_OFB = 4,
/**
* Cipher Feedback (CFB) mode
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_CFB = 5,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_MODE_CCM = 31,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_MODE_GCM = 32
}
/**
* Enum for huks key size.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key size.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksKeySize {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_512 = 512,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_768 = 768,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_1024 = 1024,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_2048 = 2048,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_3072 = 3072,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_KEY_SIZE_4096 = 4096,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ECC_KEY_SIZE_224 = 224,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ECC_KEY_SIZE_256 = 256,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ECC_KEY_SIZE_384 = 384,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ECC_KEY_SIZE_521 = 521,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_AES_KEY_SIZE_128 = 128,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_AES_KEY_SIZE_192 = 192,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_AES_KEY_SIZE_256 = 256,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 11
*/
HUKS_AES_KEY_SIZE_512 = 512,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_CURVE25519_KEY_SIZE_256 = 256,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DH_KEY_SIZE_2048 = 2048,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DH_KEY_SIZE_3072 = 3072,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DH_KEY_SIZE_4096 = 4096,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_SM2_KEY_SIZE_256 = 256,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_SM4_KEY_SIZE_128 = 128,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_DES_KEY_SIZE_64 = 64,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_3DES_KEY_SIZE_128 = 128,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_3DES_KEY_SIZE_192 = 192,
}
/**
* Enum for huks key algorithm.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key algorithm.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksKeyAlg {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_RSA = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_ECC = 2,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_DSA = 3,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_ALG_AES = 20,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_HMAC = 50,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_HKDF = 51,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_PBKDF2 = 52,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_ECDH = 100,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_X25519 = 101,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_ED25519 = 102,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_DH = 103,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_SM2 = 150,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_SM3 = 151,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_SM4 = 152,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_DES = 160,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_3DES = 161,
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_ALG_CMAC = 162
}
/**
* Enum for huks unwrap suite.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks unwrap suite.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksUnwrapSuite {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2
}
/**
* Enum for huks key generate type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Enum for huks key generate type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksKeyGenerateType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_GENERATE_TYPE_DEFAULT = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_GENERATE_TYPE_DERIVE = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_GENERATE_TYPE_AGREE = 2
}
/**
* Enum for huks key flag.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key flag.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksKeyFlag {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_FLAG_IMPORT_KEY = 1,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_FLAG_GENERATE_KEY = 2,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_FLAG_AGREE_KEY = 3,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_FLAG_DERIVE_KEY = 4
}
/**
* Enum for huks key storage type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks key storage type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksKeyStorageType {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 10
*/
HUKS_STORAGE_TEMP = 0,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 10
*/
HUKS_STORAGE_PERSISTENT = 1,
/**
* The key is stored and used only in HUKS. It is mutually exclusive with HUKS_STORAGE_KEY_EXPORT_ALLOWED.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* The key is stored and used only in HUKS. It is mutually exclusive with HUKS_STORAGE_KEY_EXPORT_ALLOWED.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_STORAGE_ONLY_USED_IN_HUKS = 2,
/**
* The key can be exported. It is mutually exclusive with HUKS_STORAGE_ONLY_USED_IN_HUKS.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* The key can be exported. It is mutually exclusive with HUKS_STORAGE_ONLY_USED_IN_HUKS.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3
}
/**
* Enum for huks import key type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks import key type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksImportKeyType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_TYPE_PUBLIC_KEY = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_TYPE_PRIVATE_KEY = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_KEY_TYPE_KEY_PAIR = 2
}
/**
* Enum for rsa salt len type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* Enum for rsa salt len type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksRsaPssSaltLenType {
/**
* Salt length that matches the digest length.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* Salt length that matches the digest length.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_PSS_SALT_LEN_DIGEST = 0,
/**
* Maximum salt length.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* Maximum salt length.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_RSA_PSS_SALT_LEN_MAX = 1
}
/**
* Enum for huks user auth type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks user auth type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksUserAuthType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_USER_AUTH_TYPE_FINGERPRINT = 1 << 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_USER_AUTH_TYPE_FACE = 1 << 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_USER_AUTH_TYPE_PIN = 1 << 2
}
/**
* Enum for huks auth access type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks auth access type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksAuthAccessType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1,
/**
* Auth type for always valid.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Auth type for always valid.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_AUTH_ACCESS_ALWAYS_VALID = 1 << 2
}
/**
* Enum for huks user auth mode.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksUserAuthMode {
/**
* Auth mode for local scenarios.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_USER_AUTH_MODE_LOCAL = 0,
/**
* Auth mode for co-auth scenarios.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_USER_AUTH_MODE_COAUTH = 1,
}
/**
* Enum for huks key file storage authentication level.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Enum for huks key file storage authentication level.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksAuthStorageLevel {
/**
* Key file storage security level for device encryption standard.
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key file storage security level for device encryption standard.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_AUTH_STORAGE_LEVEL_DE = 0,
/**
* Key file storage security level for credential encryption standard.
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key file storage security level for credential encryption standard.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_AUTH_STORAGE_LEVEL_CE = 1,
/**
* Key file storage security level for enhanced credential encryption standard.
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key file storage security level for enhanced credential encryption standard.
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_AUTH_STORAGE_LEVEL_ECE = 2,
}
/**
* Enum for huks auth access challenge type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks auth access challenge type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksChallengeType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_TYPE_NORMAL = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_TYPE_CUSTOM = 1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_TYPE_NONE = 2
}
/**
* Enum for huks challenge position.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks challenge position.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksChallengePosition {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_POS_0 = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_POS_1,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_POS_2,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_CHALLENGE_POS_3
}
/**
* Enum for huks secure sign type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Enum for huks secure sign type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
export enum HuksSecureSignType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_SECURE_SIGN_WITH_AUTHINFO = 1
}
/**
* Enum for huks ipc send type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* Enum for huks ipc send type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
export enum HuksSendType {
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_SEND_TYPE_ASYNC = 0,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_SEND_TYPE_SYNC = 1
}
/**
* Enum for huks base tag type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks base tag type.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksTagType {
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_INVALID = 0 << 28,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_INT = 1 << 28,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_UINT = 2 << 28,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_ULONG = 3 << 28,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_BOOL = 4 << 28,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_TYPE_BYTES = 5 << 28
}
/**
* Enum for huks tag.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Enum for huks tag.
*
* @enum { number }
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
export enum HuksTag {
/**
* Invalid TAG
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_INVALID = HuksTagType.HUKS_TAG_TYPE_INVALID | 0,
/* Base algorithm TAG: 1 - 200 */
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_ALGORITHM = HuksTagType.HUKS_TAG_TYPE_UINT | 1,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT | 2,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_KEY_SIZE = HuksTagType.HUKS_TAG_TYPE_UINT | 3,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_DIGEST = HuksTagType.HUKS_TAG_TYPE_UINT | 4,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_PADDING = HuksTagType.HUKS_TAG_TYPE_UINT | 5,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_BLOCK_MODE = HuksTagType.HUKS_TAG_TYPE_UINT | 6,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 7,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_ASSOCIATED_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 8,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_NONCE = HuksTagType.HUKS_TAG_TYPE_BYTES | 9,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_IV = HuksTagType.HUKS_TAG_TYPE_BYTES | 10,
/**
* Key derivation TAG.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* Key derivation TAG.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 11,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_SALT = HuksTagType.HUKS_TAG_TYPE_BYTES | 12,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_PWD = HuksTagType.HUKS_TAG_TYPE_BYTES | 13,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_ITERATION = HuksTagType.HUKS_TAG_TYPE_UINT | 14,
/**
* choose from enum HuksKeyGenerateType.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* choose from enum HuksKeyGenerateType.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_GENERATE_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 15,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_DERIVE_MAIN_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 16,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_DERIVE_FACTOR = HuksTagType.HUKS_TAG_TYPE_BYTES | 17,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_DERIVE_ALG = HuksTagType.HUKS_TAG_TYPE_UINT | 18,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_AGREE_ALG = HuksTagType.HUKS_TAG_TYPE_UINT | 19,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 20,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 21,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_AGREE_PUBLIC_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 22,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 23,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_DERIVE_KEY_SIZE = HuksTagType.HUKS_TAG_TYPE_UINT | 24,
/**
* Choose from enum HuksImportKeyType
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* Choose from enum HuksImportKeyType
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_IMPORT_KEY_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 25,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_UNWRAP_ALGORITHM_SUITE = HuksTagType.HUKS_TAG_TYPE_UINT | 26,
/**
* Key storage type, which can be HUKS_STORAGE_ONLY_USED_IN_HUKS or HUKS_STORAGE_KEY_EXPORT_ALLOWED.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* Key storage type, which can be HUKS_STORAGE_ONLY_USED_IN_HUKS or HUKS_STORAGE_KEY_EXPORT_ALLOWED.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 29,
/**
* RSA salt length type. For details, see HuksRsaPssSaltLenType.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* RSA salt length type. For details, see HuksRsaPssSaltLenType.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 30,
/*
* Key authentication related TAG: 201 - 300
*
* Start of validity
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ACTIVE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 201,
/**
* Date when new "messages" should not be created.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ORIGINATION_EXPIRE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 202,
/**
* Date when existing "messages" should not be used.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_USAGE_EXPIRE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 203,
/**
* Key creation time.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_CREATION_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 204,
/* Other authentication related TAG: 301 - 500 */
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_ALL_USERS = HuksTagType.HUKS_TAG_TYPE_BOOL | 301,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_USER_ID = HuksTagType.HUKS_TAG_TYPE_UINT | 302,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_NO_AUTH_REQUIRED = HuksTagType.HUKS_TAG_TYPE_BOOL | 303,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_USER_AUTH_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 304,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_AUTH_TIMEOUT = HuksTagType.HUKS_TAG_TYPE_UINT | 305,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_AUTH_TOKEN = HuksTagType.HUKS_TAG_TYPE_BYTES | 306,
/* Key secure access control and user auth TAG */
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_AUTH_ACCESS_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 307,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_SECURE_SIGN_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 308,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_CHALLENGE_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 309,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 9
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_CHALLENGE_POS = HuksTagType.HUKS_TAG_TYPE_UINT | 310,
/**
* Supported key secure access control purpose tag, the value from enum HuksKeyPurpose.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 10
*/
/**
* Supported key secure access control purpose tag, the value from enum HuksKeyPurpose.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_AUTH_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT | 311,
/**
* Security level of access control for key file storage, whose optional values are from enum HuksAuthStorageLevel.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Security level of access control for key file storage, whose optional values are from enum HuksAuthStorageLevel.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_AUTH_STORAGE_LEVEL = HuksTagType.HUKS_TAG_TYPE_UINT | 316,
/**
* Authentication mode of the user authtoken, whose optional values are from enum HuksUserAuthMode.
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_USER_AUTH_MODE = HuksTagType.HUKS_TAG_TYPE_UINT | 319,
/* Attestation related TAG: 501 - 600 */
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_ATTESTATION_CHALLENGE = HuksTagType.HUKS_TAG_TYPE_BYTES | 501,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_ATTESTATION_APPLICATION_ID = HuksTagType.HUKS_TAG_TYPE_BYTES | 502,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_BRAND = HuksTagType.HUKS_TAG_TYPE_BYTES | 503,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_DEVICE = HuksTagType.HUKS_TAG_TYPE_BYTES | 504,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_PRODUCT = HuksTagType.HUKS_TAG_TYPE_BYTES | 505,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_SERIAL = HuksTagType.HUKS_TAG_TYPE_BYTES | 506,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_IMEI = HuksTagType.HUKS_TAG_TYPE_BYTES | 507,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_MEID = HuksTagType.HUKS_TAG_TYPE_BYTES | 508,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_MANUFACTURER = HuksTagType.HUKS_TAG_TYPE_BYTES | 509,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_MODEL = HuksTagType.HUKS_TAG_TYPE_BYTES | 510,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_ATTESTATION_ID_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 511,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_SOCID = HuksTagType.HUKS_TAG_TYPE_BYTES | 512,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ATTESTATION_ID_UDID = HuksTagType.HUKS_TAG_TYPE_BYTES | 513,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 514,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_ATTESTATION_ID_VERSION_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 515,
/*
* Other reserved TAG: 601 - 1000
*
* Extension TAG: 1001 - 9999
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_IS_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 1001,
/**
* choose from enum HuksKeyStorageType.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* choose from enum HuksKeyStorageType.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_STORAGE_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 1002,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_IS_ALLOWED_WRAP = HuksTagType.HUKS_TAG_TYPE_BOOL | 1003,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_WRAP_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 1004,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_AUTH_ID = HuksTagType.HUKS_TAG_TYPE_BYTES | 1005,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_ROLE = HuksTagType.HUKS_TAG_TYPE_UINT | 1006,
/**
* choose from enum HuksKeyFlag.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* choose from enum HuksKeyFlag.
*
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 1007,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_IS_ASYNCHRONIZED = HuksTagType.HUKS_TAG_TYPE_UINT | 1008,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_SECURE_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 1009,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_SECURE_KEY_UUID = HuksTagType.HUKS_TAG_TYPE_BYTES | 1010,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY_DOMAIN = HuksTagType.HUKS_TAG_TYPE_UINT | 1011,
/**
* Key access control based on device password setting status. True means the key can only be generated and used when the password is set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @since 11
*/
/**
* Key access control based on device password setting status. True means the key can only be generated and used when the password is set.
*
* @syscap SystemCapability.Security.Huks.Extension
* @atomicservice
* @since 12
*/
HUKS_TAG_IS_DEVICE_PASSWORD_SET = HuksTagType.HUKS_TAG_TYPE_BOOL | 1012,
/* Inner-use TAG: 10001 - 10999 */
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_PROCESS_NAME = HuksTagType.HUKS_TAG_TYPE_BYTES | 10001,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_PACKAGE_NAME = HuksTagType.HUKS_TAG_TYPE_BYTES | 10002,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_ACCESS_TIME = HuksTagType.HUKS_TAG_TYPE_UINT | 10003,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_USES_TIME = HuksTagType.HUKS_TAG_TYPE_UINT | 10004,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_CRYPTO_CTX = HuksTagType.HUKS_TAG_TYPE_ULONG | 10005,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 10006,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_KEY_VERSION = HuksTagType.HUKS_TAG_TYPE_UINT | 10007,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
* @deprecated since 9
*/
HUKS_TAG_PAYLOAD_LEN = HuksTagType.HUKS_TAG_TYPE_UINT | 10008,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 11
*/
HUKS_TAG_AE_TAG = HuksTagType.HUKS_TAG_TYPE_BYTES | 10009,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_IS_KEY_HANDLE = HuksTagType.HUKS_TAG_TYPE_ULONG | 10010,
/**
* Os version related TAG.
*
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_OS_VERSION = HuksTagType.HUKS_TAG_TYPE_UINT | 10101,
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
* @deprecated since 9
*/
HUKS_TAG_OS_PATCHLEVEL = HuksTagType.HUKS_TAG_TYPE_UINT | 10102,
/*
* Reserved TAGs: 11000 - 12000
*
* Other TAGs: 20001 - N
* TAGs used for paramSetOut
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_SYMMETRIC_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20001,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20002,
/**
* @syscap SystemCapability.Security.Huks.Extension
* @since 8
*/
/**
* @syscap SystemCapability.Security.Huks.Core
* @atomicservice
* @since 12
*/
HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20003
}
}
export default huks;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lffl8796/interface_sdk-js.git
git@gitee.com:lffl8796/interface_sdk-js.git
lffl8796
interface_sdk-js
interface_sdk-js
master

搜索帮助