Back to index

lightning-sunbird  0.9+nobinonly
nssckfwc.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 #ifndef NSSCKFWC_H
00038 #define NSSCKFWC_H
00039 
00040 #ifdef DEBUG
00041 static const char NSSCKFWC_CVS_ID[] = "@(#) $RCSfile: nssckfwc.h,v $ $Revision: 1.3 $ $Date: 2005/01/20 02:25:45 $";
00042 #endif /* DEBUG */
00043 
00044 /*
00045  * nssckfwc.h
00046  *
00047  * This file prototypes all of the NSS Cryptoki Framework "wrapper" 
00048  * which implement the PKCS#11 API.  Technically, these are public
00049  * routines (with capital "NSS" prefixes), since they are called
00050  * from (generated) code within a Module using the Framework.
00051  * However, they should not be called except from those generated
00052  * calls.  Hence, the prototypes have been split out into this file.
00053  */
00054 
00055 #ifndef NSSCKT_H
00056 #include "nssckt.h"
00057 #endif /* NSSCKT_H */
00058 
00059 #ifndef NSSCKFWT_H
00060 #include "nssckfwt.h"
00061 #endif /* NSSCKFWT_H */
00062 
00063 #ifndef NSSCKMDT_H
00064 #include "nssckmdt.h"
00065 #endif /* NSSCKMDT_H */
00066 
00067 /*
00068  * NSSCKFWC_Initialize
00069  * NSSCKFWC_Finalize
00070  * NSSCKFWC_GetInfo
00071  * -- NSSCKFWC_GetFunctionList -- see the API insert file
00072  * NSSCKFWC_GetSlotList
00073  * NSSCKFWC_GetSlotInfo
00074  * NSSCKFWC_GetTokenInfo
00075  * NSSCKFWC_WaitForSlotEvent
00076  * NSSCKFWC_GetMechanismList
00077  * NSSCKFWC_GetMechanismInfo
00078  * NSSCKFWC_InitToken
00079  * NSSCKFWC_InitPIN
00080  * NSSCKFWC_SetPIN
00081  * NSSCKFWC_OpenSession
00082  * NSSCKFWC_CloseSession
00083  * NSSCKFWC_CloseAllSessions
00084  * NSSCKFWC_GetSessionInfo
00085  * NSSCKFWC_GetOperationState
00086  * NSSCKFWC_SetOperationState
00087  * NSSCKFWC_Login
00088  * NSSCKFWC_Logout
00089  * NSSCKFWC_CreateObject
00090  * NSSCKFWC_CopyObject
00091  * NSSCKFWC_DestroyObject
00092  * NSSCKFWC_GetObjectSize
00093  * NSSCKFWC_GetAttributeValue
00094  * NSSCKFWC_SetAttributeValue
00095  * NSSCKFWC_FindObjectsInit
00096  * NSSCKFWC_FindObjects
00097  * NSSCKFWC_FindObjectsFinal
00098  * NSSCKFWC_EncryptInit
00099  * NSSCKFWC_Encrypt
00100  * NSSCKFWC_EncryptUpdate
00101  * NSSCKFWC_EncryptFinal
00102  * NSSCKFWC_DecryptInit
00103  * NSSCKFWC_Decrypt
00104  * NSSCKFWC_DecryptUpdate
00105  * NSSCKFWC_DecryptFinal
00106  * NSSCKFWC_DigestInit
00107  * NSSCKFWC_Digest
00108  * NSSCKFWC_DigestUpdate
00109  * NSSCKFWC_DigestKey
00110  * NSSCKFWC_DigestFinal
00111  * NSSCKFWC_SignInit
00112  * NSSCKFWC_Sign
00113  * NSSCKFWC_SignUpdate
00114  * NSSCKFWC_SignFinal
00115  * NSSCKFWC_SignRecoverInit
00116  * NSSCKFWC_SignRecover
00117  * NSSCKFWC_VerifyInit
00118  * NSSCKFWC_Verify
00119  * NSSCKFWC_VerifyUpdate
00120  * NSSCKFWC_VerifyFinal
00121  * NSSCKFWC_VerifyRecoverInit
00122  * NSSCKFWC_VerifyRecover
00123  * NSSCKFWC_DigestEncryptUpdate
00124  * NSSCKFWC_DecryptDigestUpdate
00125  * NSSCKFWC_SignEncryptUpdate
00126  * NSSCKFWC_DecryptVerifyUpdate
00127  * NSSCKFWC_GenerateKey
00128  * NSSCKFWC_GenerateKeyPair
00129  * NSSCKFWC_WrapKey
00130  * NSSCKFWC_UnwrapKey
00131  * NSSCKFWC_DeriveKey
00132  * NSSCKFWC_SeedRandom
00133  * NSSCKFWC_GenerateRandom
00134  * NSSCKFWC_GetFunctionStatus
00135  * NSSCKFWC_CancelFunction
00136  */
00137 
00138 /*
00139  * NSSCKFWC_Initialize
00140  *
00141  */
00142 NSS_EXTERN CK_RV
00143 NSSCKFWC_Initialize
00144 (
00145   NSSCKFWInstance **pFwInstance,
00146   NSSCKMDInstance *mdInstance,
00147   CK_VOID_PTR pInitArgs
00148 );
00149 
00150 /*
00151  * NSSCKFWC_Finalize
00152  *
00153  */
00154 NSS_EXTERN CK_RV
00155 NSSCKFWC_Finalize
00156 (
00157   NSSCKFWInstance **pFwInstance
00158 );
00159 
00160 /*
00161  * NSSCKFWC_GetInfo
00162  *
00163  */
00164 NSS_EXTERN CK_RV
00165 NSSCKFWC_GetInfo
00166 (
00167   NSSCKFWInstance *fwInstance,
00168   CK_INFO_PTR pInfo
00169 );
00170   
00171 /*
00172  * C_GetFunctionList is implemented entirely in the Module's file which
00173  * includes the Framework API insert file.  It requires no "actual"
00174  * NSSCKFW routine.
00175  */
00176 
00177 /*
00178  * NSSCKFWC_GetSlotList
00179  *
00180  */
00181 NSS_EXTERN CK_RV
00182 NSSCKFWC_GetSlotList
00183 (
00184   NSSCKFWInstance *fwInstance,
00185   CK_BBOOL tokenPresent,
00186   CK_SLOT_ID_PTR pSlotList,
00187   CK_ULONG_PTR pulCount
00188 );
00189  
00190 /*
00191  * NSSCKFWC_GetSlotInfo
00192  *
00193  */
00194 NSS_EXTERN CK_RV
00195 NSSCKFWC_GetSlotInfo
00196 (
00197   NSSCKFWInstance *fwInstance,
00198   CK_SLOT_ID slotID,
00199   CK_SLOT_INFO_PTR pInfo
00200 );
00201 
00202 /*
00203  * NSSCKFWC_GetTokenInfo
00204  *
00205  */
00206 NSS_EXTERN CK_RV
00207 NSSCKFWC_GetTokenInfo
00208 (
00209   NSSCKFWInstance *fwInstance,
00210   CK_SLOT_ID slotID,
00211   CK_TOKEN_INFO_PTR pInfo
00212 );
00213 
00214 /*
00215  * NSSCKFWC_WaitForSlotEvent
00216  *
00217  */
00218 NSS_EXTERN CK_RV
00219 NSSCKFWC_WaitForSlotEvent
00220 (
00221   NSSCKFWInstance *fwInstance,
00222   CK_FLAGS flags,
00223   CK_SLOT_ID_PTR pSlot,
00224   CK_VOID_PTR pReserved
00225 );
00226 
00227 /*
00228  * NSSCKFWC_GetMechanismList
00229  *
00230  */
00231 NSS_EXTERN CK_RV
00232 NSSCKFWC_GetMechanismList
00233 (
00234   NSSCKFWInstance *fwInstance,
00235   CK_SLOT_ID slotID,
00236   CK_MECHANISM_TYPE_PTR pMechanismList,
00237   CK_ULONG_PTR pulCount
00238 );
00239 
00240 /*
00241  * NSSCKFWC_GetMechanismInfo
00242  *
00243  */
00244 NSS_EXTERN CK_RV
00245 NSSCKFWC_GetMechanismInfo
00246 (
00247   NSSCKFWInstance *fwInstance,
00248   CK_SLOT_ID slotID,
00249   CK_MECHANISM_TYPE type,
00250   CK_MECHANISM_INFO_PTR pInfo
00251 );
00252 
00253 /*
00254  * NSSCKFWC_InitToken
00255  *
00256  */
00257 NSS_EXTERN CK_RV
00258 NSSCKFWC_InitToken
00259 (
00260   NSSCKFWInstance *fwInstance,
00261   CK_SLOT_ID slotID,
00262   CK_CHAR_PTR pPin,
00263   CK_ULONG ulPinLen,
00264   CK_CHAR_PTR pLabel
00265 );
00266 
00267 /*
00268  * NSSCKFWC_InitPIN
00269  *
00270  */
00271 NSS_EXTERN CK_RV
00272 NSSCKFWC_InitPIN
00273 (
00274   NSSCKFWInstance *fwInstance,
00275   CK_SESSION_HANDLE hSession,
00276   CK_CHAR_PTR pPin,
00277   CK_ULONG ulPinLen
00278 );
00279 
00280 /*
00281  * NSSCKFWC_SetPIN
00282  *
00283  */
00284 NSS_EXTERN CK_RV
00285 NSSCKFWC_SetPIN
00286 (
00287   NSSCKFWInstance *fwInstance,
00288   CK_SESSION_HANDLE hSession,
00289   CK_CHAR_PTR pOldPin,
00290   CK_ULONG ulOldLen,
00291   CK_CHAR_PTR pNewPin,
00292   CK_ULONG ulNewLen
00293 );
00294 
00295 /*
00296  * NSSCKFWC_OpenSession
00297  *
00298  */
00299 NSS_EXTERN CK_RV
00300 NSSCKFWC_OpenSession
00301 (
00302   NSSCKFWInstance *fwInstance,
00303   CK_SLOT_ID slotID,
00304   CK_FLAGS flags,
00305   CK_VOID_PTR pApplication,
00306   CK_NOTIFY Notify,
00307   CK_SESSION_HANDLE_PTR phSession
00308 );
00309 
00310 /*
00311  * NSSCKFWC_CloseSession
00312  *
00313  */
00314 NSS_EXTERN CK_RV
00315 NSSCKFWC_CloseSession
00316 (
00317   NSSCKFWInstance *fwInstance,
00318   CK_SESSION_HANDLE hSession
00319 );
00320 
00321 /*
00322  * NSSCKFWC_CloseAllSessions
00323  *
00324  */
00325 NSS_EXTERN CK_RV
00326 NSSCKFWC_CloseAllSessions
00327 (
00328   NSSCKFWInstance *fwInstance,
00329   CK_SLOT_ID slotID
00330 );
00331 
00332 /*
00333  * NSSCKFWC_GetSessionInfo
00334  *
00335  */
00336 NSS_EXTERN CK_RV
00337 NSSCKFWC_GetSessionInfo
00338 (
00339   NSSCKFWInstance *fwInstance,
00340   CK_SESSION_HANDLE hSession,
00341   CK_SESSION_INFO_PTR pInfo
00342 );
00343 
00344 /*
00345  * NSSCKFWC_GetOperationState
00346  *
00347  */
00348 NSS_EXTERN CK_RV
00349 NSSCKFWC_GetOperationState
00350 (
00351   NSSCKFWInstance *fwInstance,
00352   CK_SESSION_HANDLE hSession,
00353   CK_BYTE_PTR pOperationState,
00354   CK_ULONG_PTR pulOperationStateLen
00355 );
00356 
00357 /*
00358  * NSSCKFWC_SetOperationState
00359  *
00360  */
00361 NSS_EXTERN CK_RV
00362 NSSCKFWC_SetOperationState
00363 (
00364   NSSCKFWInstance *fwInstance,
00365   CK_SESSION_HANDLE hSession,
00366   CK_BYTE_PTR pOperationState,
00367   CK_ULONG ulOperationStateLen,
00368   CK_OBJECT_HANDLE hEncryptionKey,
00369   CK_OBJECT_HANDLE hAuthenticationKey
00370 );
00371 
00372 /*
00373  * NSSCKFWC_Login
00374  *
00375  */
00376 NSS_EXTERN CK_RV
00377 NSSCKFWC_Login
00378 (
00379   NSSCKFWInstance *fwInstance,
00380   CK_SESSION_HANDLE hSession,
00381   CK_USER_TYPE userType,
00382   CK_CHAR_PTR pPin,
00383   CK_ULONG ulPinLen
00384 );
00385 
00386 /*
00387  * NSSCKFWC_Logout
00388  *
00389  */
00390 NSS_EXTERN CK_RV
00391 NSSCKFWC_Logout
00392 (
00393   NSSCKFWInstance *fwInstance,
00394   CK_SESSION_HANDLE hSession
00395 );
00396 
00397 /*
00398  * NSSCKFWC_CreateObject
00399  *
00400  */
00401 NSS_EXTERN CK_RV
00402 NSSCKFWC_CreateObject
00403 (
00404   NSSCKFWInstance *fwInstance,
00405   CK_SESSION_HANDLE hSession,
00406   CK_ATTRIBUTE_PTR pTemplate,
00407   CK_ULONG ulCount,
00408   CK_OBJECT_HANDLE_PTR phObject
00409 );
00410 
00411 /*
00412  * NSSCKFWC_CopyObject
00413  *
00414  */
00415 NSS_EXTERN CK_RV
00416 NSSCKFWC_CopyObject
00417 (
00418   NSSCKFWInstance *fwInstance,
00419   CK_SESSION_HANDLE hSession,
00420   CK_OBJECT_HANDLE hObject,
00421   CK_ATTRIBUTE_PTR pTemplate,
00422   CK_ULONG ulCount,
00423   CK_OBJECT_HANDLE_PTR phNewObject
00424 );
00425 
00426 /*
00427  * NSSCKFWC_DestroyObject
00428  *
00429  */
00430 NSS_EXTERN CK_RV
00431 NSSCKFWC_DestroyObject
00432 (
00433   NSSCKFWInstance *fwInstance,
00434   CK_SESSION_HANDLE hSession,
00435   CK_OBJECT_HANDLE hObject
00436 );
00437 
00438 /*
00439  * NSSCKFWC_GetObjectSize
00440  *
00441  */
00442 NSS_EXTERN CK_RV
00443 NSSCKFWC_GetObjectSize
00444 (
00445   NSSCKFWInstance *fwInstance,
00446   CK_SESSION_HANDLE hSession,
00447   CK_OBJECT_HANDLE hObject,
00448   CK_ULONG_PTR pulSize
00449 );
00450 
00451 /*
00452  * NSSCKFWC_GetAttributeValue
00453  *
00454  */
00455 NSS_EXTERN CK_RV
00456 NSSCKFWC_GetAttributeValue
00457 (
00458   NSSCKFWInstance *fwInstance,
00459   CK_SESSION_HANDLE hSession,
00460   CK_OBJECT_HANDLE hObject,
00461   CK_ATTRIBUTE_PTR pTemplate,
00462   CK_ULONG ulCount
00463 );
00464   
00465 /*
00466  * NSSCKFWC_SetAttributeValue
00467  *
00468  */
00469 NSS_EXTERN CK_RV
00470 NSSCKFWC_SetAttributeValue
00471 (
00472   NSSCKFWInstance *fwInstance,
00473   CK_SESSION_HANDLE hSession,
00474   CK_OBJECT_HANDLE hObject,
00475   CK_ATTRIBUTE_PTR pTemplate,
00476   CK_ULONG ulCount
00477 );
00478 
00479 /*
00480  * NSSCKFWC_FindObjectsInit
00481  *
00482  */
00483 NSS_EXTERN CK_RV
00484 NSSCKFWC_FindObjectsInit
00485 (
00486   NSSCKFWInstance *fwInstance,
00487   CK_SESSION_HANDLE hSession,
00488   CK_ATTRIBUTE_PTR pTemplate,
00489   CK_ULONG ulCount
00490 );
00491 
00492 /*
00493  * NSSCKFWC_FindObjects
00494  *
00495  */
00496 NSS_EXTERN CK_RV
00497 NSSCKFWC_FindObjects
00498 (
00499   NSSCKFWInstance *fwInstance,
00500   CK_SESSION_HANDLE hSession,
00501   CK_OBJECT_HANDLE_PTR phObject,
00502   CK_ULONG ulMaxObjectCount,
00503   CK_ULONG_PTR pulObjectCount
00504 );
00505 
00506 /*
00507  * NSSCKFWC_FindObjectsFinal
00508  *
00509  */
00510 NSS_EXTERN CK_RV
00511 NSSCKFWC_FindObjectsFinal
00512 (
00513   NSSCKFWInstance *fwInstance,
00514   CK_SESSION_HANDLE hSession
00515 );
00516 
00517 /*
00518  * NSSCKFWC_EncryptInit
00519  *
00520  */
00521 NSS_EXTERN CK_RV
00522 NSSCKFWC_EncryptInit
00523 (
00524   NSSCKFWInstance *fwInstance,
00525   CK_SESSION_HANDLE hSession,
00526   CK_MECHANISM_PTR pMechanism,
00527   CK_OBJECT_HANDLE hKey
00528 );
00529 
00530 /*
00531  * NSSCKFWC_Encrypt
00532  *
00533  */
00534 NSS_EXTERN CK_RV
00535 NSSCKFWC_Encrypt
00536 (
00537   NSSCKFWInstance *fwInstance,
00538   CK_SESSION_HANDLE hSession,
00539   CK_BYTE_PTR pData,
00540   CK_ULONG ulDataLen,
00541   CK_BYTE_PTR pEncryptedData,
00542   CK_ULONG_PTR pulEncryptedDataLen
00543 );
00544 
00545 /*
00546  * NSSCKFWC_EncryptUpdate
00547  *
00548  */
00549 NSS_EXTERN CK_RV
00550 NSSCKFWC_EncryptUpdate
00551 (
00552   NSSCKFWInstance *fwInstance,
00553   CK_SESSION_HANDLE hSession,
00554   CK_BYTE_PTR pPart,
00555   CK_ULONG ulPartLen,
00556   CK_BYTE_PTR pEncryptedPart,
00557   CK_ULONG_PTR pulEncryptedPartLen
00558 );
00559 
00560 /*
00561  * NSSCKFWC_EncryptFinal
00562  *
00563  */
00564 NSS_EXTERN CK_RV
00565 NSSCKFWC_EncryptFinal
00566 (
00567   NSSCKFWInstance *fwInstance,
00568   CK_SESSION_HANDLE hSession,
00569   CK_BYTE_PTR pLastEncryptedPart,
00570   CK_ULONG_PTR pulLastEncryptedPartLen
00571 );
00572 
00573 /*
00574  * NSSCKFWC_DecryptInit
00575  *
00576  */
00577 NSS_EXTERN CK_RV
00578 NSSCKFWC_DecryptInit
00579 (
00580   NSSCKFWInstance *fwInstance,
00581   CK_SESSION_HANDLE hSession,
00582   CK_MECHANISM_PTR pMechanism,
00583   CK_OBJECT_HANDLE hKey
00584 );
00585 
00586 /*
00587  * NSSCKFWC_Decrypt
00588  *
00589  */
00590 NSS_EXTERN CK_RV
00591 NSSCKFWC_Decrypt
00592 (
00593   NSSCKFWInstance *fwInstance,
00594   CK_SESSION_HANDLE hSession,
00595   CK_BYTE_PTR pEncryptedData,
00596   CK_ULONG ulEncryptedDataLen,
00597   CK_BYTE_PTR pData,
00598   CK_ULONG_PTR pulDataLen
00599 );
00600 
00601 /*
00602  * NSSCKFWC_DecryptUpdate
00603  *
00604  */
00605 NSS_EXTERN CK_RV
00606 NSSCKFWC_DecryptUpdate
00607 (
00608   NSSCKFWInstance *fwInstance,
00609   CK_SESSION_HANDLE hSession,
00610   CK_BYTE_PTR pEncryptedPart,
00611   CK_ULONG ulEncryptedPartLen,
00612   CK_BYTE_PTR pPart,
00613   CK_ULONG_PTR pulPartLen
00614 );
00615 
00616 /*
00617  * NSSCKFWC_DecryptFinal
00618  *
00619  */
00620 NSS_EXTERN CK_RV
00621 NSSCKFWC_DecryptFinal
00622 (
00623   NSSCKFWInstance *fwInstance,
00624   CK_SESSION_HANDLE hSession,
00625   CK_BYTE_PTR pLastPart,
00626   CK_ULONG_PTR pulLastPartLen
00627 );
00628 
00629 /*
00630  * NSSCKFWC_DigestInit
00631  *
00632  */
00633 NSS_EXTERN CK_RV
00634 NSSCKFWC_DigestInit
00635 (
00636   NSSCKFWInstance *fwInstance,
00637   CK_SESSION_HANDLE hSession,
00638   CK_MECHANISM_PTR pMechanism
00639 );
00640 
00641 /*
00642  * NSSCKFWC_Digest
00643  *
00644  */
00645 NSS_EXTERN CK_RV
00646 NSSCKFWC_Digest
00647 (
00648   NSSCKFWInstance *fwInstance,
00649   CK_SESSION_HANDLE hSession,
00650   CK_BYTE_PTR pData,
00651   CK_ULONG ulDataLen,
00652   CK_BYTE_PTR pDigest,
00653   CK_ULONG_PTR pulDigestLen
00654 );
00655 
00656 /*
00657  * NSSCKFWC_DigestUpdate
00658  *
00659  */
00660 NSS_EXTERN CK_RV
00661 NSSCKFWC_DigestUpdate
00662 (
00663   NSSCKFWInstance *fwInstance,
00664   CK_SESSION_HANDLE hSession,
00665   CK_BYTE_PTR pData,
00666   CK_ULONG ulDataLen
00667 );
00668 
00669 /*
00670  * NSSCKFWC_DigestKey
00671  *
00672  */
00673 NSS_EXTERN CK_RV
00674 NSSCKFWC_DigestKey
00675 (
00676   NSSCKFWInstance *fwInstance,
00677   CK_SESSION_HANDLE hSession,
00678   CK_OBJECT_HANDLE hKey
00679 );
00680 
00681 /*
00682  * NSSCKFWC_DigestFinal
00683  *
00684  */
00685 NSS_EXTERN CK_RV
00686 NSSCKFWC_DigestFinal
00687 (
00688   NSSCKFWInstance *fwInstance,
00689   CK_SESSION_HANDLE hSession,
00690   CK_BYTE_PTR pDigest,
00691   CK_ULONG_PTR pulDigestLen
00692 );
00693 
00694 /*
00695  * NSSCKFWC_SignInit
00696  *
00697  */
00698 NSS_EXTERN CK_RV
00699 NSSCKFWC_SignInit
00700 (
00701   NSSCKFWInstance *fwInstance,
00702   CK_SESSION_HANDLE hSession,
00703   CK_MECHANISM_PTR pMechanism,
00704   CK_OBJECT_HANDLE hKey
00705 );
00706 
00707 /*
00708  * NSSCKFWC_Sign
00709  *
00710  */
00711 NSS_EXTERN CK_RV
00712 NSSCKFWC_Sign
00713 (
00714   NSSCKFWInstance *fwInstance,
00715   CK_SESSION_HANDLE hSession,
00716   CK_BYTE_PTR pData,
00717   CK_ULONG ulDataLen,
00718   CK_BYTE_PTR pSignature,
00719   CK_ULONG_PTR pulSignatureLen
00720 );
00721 
00722 /*
00723  * NSSCKFWC_SignUpdate
00724  *
00725  */
00726 NSS_EXTERN CK_RV
00727 NSSCKFWC_SignUpdate
00728 (
00729   NSSCKFWInstance *fwInstance,
00730   CK_SESSION_HANDLE hSession,
00731   CK_BYTE_PTR pPart,
00732   CK_ULONG ulPartLen
00733 );
00734 
00735 /*
00736  * NSSCKFWC_SignFinal
00737  *
00738  */
00739 NSS_EXTERN CK_RV
00740 NSSCKFWC_SignFinal
00741 (
00742   NSSCKFWInstance *fwInstance,
00743   CK_SESSION_HANDLE hSession,
00744   CK_BYTE_PTR pSignature,
00745   CK_ULONG_PTR pulSignatureLen
00746 );
00747 
00748 /*
00749  * NSSCKFWC_SignRecoverInit
00750  *
00751  */
00752 NSS_EXTERN CK_RV
00753 NSSCKFWC_SignRecoverInit
00754 (
00755   NSSCKFWInstance *fwInstance,
00756   CK_SESSION_HANDLE hSession,
00757   CK_MECHANISM_PTR pMechanism,
00758   CK_OBJECT_HANDLE hKey
00759 );
00760 
00761 /*
00762  * NSSCKFWC_SignRecover
00763  *
00764  */
00765 NSS_EXTERN CK_RV
00766 NSSCKFWC_SignRecover
00767 (
00768   NSSCKFWInstance *fwInstance,
00769   CK_SESSION_HANDLE hSession,
00770   CK_BYTE_PTR pData,
00771   CK_ULONG ulDataLen,
00772   CK_BYTE_PTR pSignature,
00773   CK_ULONG_PTR pulSignatureLen
00774 );
00775 
00776 /*
00777  * NSSCKFWC_VerifyInit
00778  *
00779  */
00780 NSS_EXTERN CK_RV
00781 NSSCKFWC_VerifyInit
00782 (
00783   NSSCKFWInstance *fwInstance,
00784   CK_SESSION_HANDLE hSession,
00785   CK_MECHANISM_PTR pMechanism,
00786   CK_OBJECT_HANDLE hKey
00787 );
00788 
00789 /*
00790  * NSSCKFWC_Verify
00791  *
00792  */
00793 NSS_EXTERN CK_RV
00794 NSSCKFWC_Verify
00795 (
00796   NSSCKFWInstance *fwInstance,
00797   CK_SESSION_HANDLE hSession,
00798   CK_BYTE_PTR pData,
00799   CK_ULONG ulDataLen,
00800   CK_BYTE_PTR pSignature,
00801   CK_ULONG ulSignatureLen
00802 );
00803 
00804 /*
00805  * NSSCKFWC_VerifyUpdate
00806  *
00807  */
00808 NSS_EXTERN CK_RV
00809 NSSCKFWC_VerifyUpdate
00810 (
00811   NSSCKFWInstance *fwInstance,
00812   CK_SESSION_HANDLE hSession,
00813   CK_BYTE_PTR pPart,
00814   CK_ULONG ulPartLen
00815 );
00816 
00817 /*
00818  * NSSCKFWC_VerifyFinal
00819  *
00820  */
00821 NSS_EXTERN CK_RV
00822 NSSCKFWC_VerifyFinal
00823 (
00824   NSSCKFWInstance *fwInstance,
00825   CK_SESSION_HANDLE hSession,
00826   CK_BYTE_PTR pSignature,
00827   CK_ULONG ulSignatureLen
00828 );
00829 
00830 /*
00831  * NSSCKFWC_VerifyRecoverInit
00832  *
00833  */
00834 NSS_EXTERN CK_RV
00835 NSSCKFWC_VerifyRecoverInit
00836 (
00837   NSSCKFWInstance *fwInstance,
00838   CK_SESSION_HANDLE hSession,
00839   CK_MECHANISM_PTR pMechanism,
00840   CK_OBJECT_HANDLE hKey
00841 );
00842 
00843 /*
00844  * NSSCKFWC_VerifyRecover
00845  *
00846  */
00847 NSS_EXTERN CK_RV
00848 NSSCKFWC_VerifyRecover
00849 (
00850   NSSCKFWInstance *fwInstance,
00851   CK_SESSION_HANDLE hSession,
00852   CK_BYTE_PTR pSignature,
00853   CK_ULONG ulSignatureLen,
00854   CK_BYTE_PTR pData,
00855   CK_ULONG_PTR pulDataLen
00856 );
00857 
00858 /*
00859  * NSSCKFWC_DigestEncryptUpdate
00860  *
00861  */
00862 NSS_EXTERN CK_RV
00863 NSSCKFWC_DigestEncryptUpdate
00864 (
00865   NSSCKFWInstance *fwInstance,
00866   CK_SESSION_HANDLE hSession,
00867   CK_BYTE_PTR pPart,
00868   CK_ULONG ulPartLen,
00869   CK_BYTE_PTR pEncryptedPart,
00870   CK_ULONG_PTR pulEncryptedPartLen
00871 );
00872 
00873 /*
00874  * NSSCKFWC_DecryptDigestUpdate
00875  *
00876  */
00877 NSS_EXTERN CK_RV
00878 NSSCKFWC_DecryptDigestUpdate
00879 (
00880   NSSCKFWInstance *fwInstance,
00881   CK_SESSION_HANDLE hSession,
00882   CK_BYTE_PTR pEncryptedPart,
00883   CK_ULONG ulEncryptedPartLen,
00884   CK_BYTE_PTR pPart,
00885   CK_ULONG_PTR pulPartLen
00886 );
00887 
00888 /*
00889  * NSSCKFWC_SignEncryptUpdate
00890  *
00891  */
00892 NSS_EXTERN CK_RV
00893 NSSCKFWC_SignEncryptUpdate
00894 (
00895   NSSCKFWInstance *fwInstance,
00896   CK_SESSION_HANDLE hSession,
00897   CK_BYTE_PTR pPart,
00898   CK_ULONG ulPartLen,
00899   CK_BYTE_PTR pEncryptedPart,
00900   CK_ULONG_PTR pulEncryptedPartLen
00901 );
00902 
00903 /*
00904  * NSSCKFWC_DecryptVerifyUpdate
00905  *
00906  */
00907 NSS_EXTERN CK_RV
00908 NSSCKFWC_DecryptVerifyUpdate
00909 (
00910   NSSCKFWInstance *fwInstance,
00911   CK_SESSION_HANDLE hSession,
00912   CK_BYTE_PTR pEncryptedPart,
00913   CK_ULONG ulEncryptedPartLen,
00914   CK_BYTE_PTR pPart,
00915   CK_ULONG_PTR pulPartLen
00916 );
00917 
00918 /*
00919  * NSSCKFWC_GenerateKey
00920  *
00921  */
00922 NSS_EXTERN CK_RV
00923 NSSCKFWC_GenerateKey
00924 (
00925   NSSCKFWInstance *fwInstance,
00926   CK_SESSION_HANDLE hSession,
00927   CK_MECHANISM_PTR pMechanism,
00928   CK_ATTRIBUTE_PTR pTemplate,
00929   CK_ULONG ulCount,
00930   CK_OBJECT_HANDLE_PTR phKey
00931 );
00932 
00933 /*
00934  * NSSCKFWC_GenerateKeyPair
00935  *
00936  */
00937 NSS_EXTERN CK_RV
00938 NSSCKFWC_GenerateKeyPair
00939 (
00940   NSSCKFWInstance *fwInstance,
00941   CK_SESSION_HANDLE hSession,
00942   CK_MECHANISM_PTR pMechanism,
00943   CK_ATTRIBUTE_PTR pPublicKeyTemplate,
00944   CK_ULONG ulPublicKeyAttributeCount,
00945   CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
00946   CK_ULONG ulPrivateKeyAttributeCount,
00947   CK_OBJECT_HANDLE_PTR phPublicKey,
00948   CK_OBJECT_HANDLE_PTR phPrivateKey
00949 );
00950 
00951 /*
00952  * NSSCKFWC_WrapKey
00953  *
00954  */
00955 NSS_EXTERN CK_RV
00956 NSSCKFWC_WrapKey
00957 (
00958   NSSCKFWInstance *fwInstance,
00959   CK_SESSION_HANDLE hSession,
00960   CK_MECHANISM_PTR pMechanism,
00961   CK_OBJECT_HANDLE hWrappingKey,
00962   CK_OBJECT_HANDLE hKey,
00963   CK_BYTE_PTR pWrappedKey,
00964   CK_ULONG_PTR pulWrappedKeyLen
00965 );
00966 
00967 /*
00968  * NSSCKFWC_UnwrapKey
00969  *
00970  */
00971 NSS_EXTERN CK_RV
00972 NSSCKFWC_UnwrapKey
00973 (
00974   NSSCKFWInstance *fwInstance,
00975   CK_SESSION_HANDLE hSession,
00976   CK_MECHANISM_PTR pMechanism,
00977   CK_OBJECT_HANDLE hUnwrappingKey,
00978   CK_BYTE_PTR pWrappedKey,
00979   CK_ULONG ulWrappedKeyLen,
00980   CK_ATTRIBUTE_PTR pTemplate,
00981   CK_ULONG ulAttributeCount,
00982   CK_OBJECT_HANDLE_PTR phKey
00983 );
00984 
00985 /*
00986  * NSSCKFWC_DeriveKey
00987  *
00988  */
00989 NSS_EXTERN CK_RV
00990 NSSCKFWC_DeriveKey
00991 (
00992   NSSCKFWInstance *fwInstance,
00993   CK_SESSION_HANDLE hSession,
00994   CK_MECHANISM_PTR pMechanism,
00995   CK_OBJECT_HANDLE hBaseKey,
00996   CK_ATTRIBUTE_PTR pTemplate,
00997   CK_ULONG ulAttributeCount,
00998   CK_OBJECT_HANDLE_PTR phKey
00999 );
01000 
01001 /*
01002  * NSSCKFWC_SeedRandom
01003  *
01004  */
01005 NSS_EXTERN CK_RV
01006 NSSCKFWC_SeedRandom
01007 (
01008   NSSCKFWInstance *fwInstance,
01009   CK_SESSION_HANDLE hSession,
01010   CK_BYTE_PTR pSeed,
01011   CK_ULONG ulSeedLen
01012 );
01013 
01014 /*
01015  * NSSCKFWC_GenerateRandom
01016  *
01017  */
01018 NSS_EXTERN CK_RV
01019 NSSCKFWC_GenerateRandom
01020 (
01021   NSSCKFWInstance *fwInstance,
01022   CK_SESSION_HANDLE hSession,
01023   CK_BYTE_PTR pRandomData,
01024   CK_ULONG ulRandomLen
01025 );
01026 
01027 /*
01028  * NSSCKFWC_GetFunctionStatus
01029  *
01030  */
01031 NSS_EXTERN CK_RV
01032 NSSCKFWC_GetFunctionStatus
01033 (
01034   NSSCKFWInstance *fwInstance,
01035   CK_SESSION_HANDLE hSession
01036 );
01037 
01038 /*
01039  * NSSCKFWC_CancelFunction
01040  *
01041  */
01042 NSS_EXTERN CK_RV
01043 NSSCKFWC_CancelFunction
01044 (
01045   NSSCKFWInstance *fwInstance,
01046   CK_SESSION_HANDLE hSession
01047 );
01048 
01049 #endif /* NSSCKFWC_H */