PageRenderTime 126ms CodeModel.GetById 40ms app.highlight 39ms RepoModel.GetById 21ms app.codeStats 1ms

/gecko_api/include/nssckfwc.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 1049 lines | 585 code | 76 blank | 388 comment | 0 complexity | 714a295976e185ae140ea8abbfb96180 MD5 | raw file
   1/* ***** BEGIN LICENSE BLOCK *****
   2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
   3 *
   4 * The contents of this file are subject to the Mozilla Public License Version
   5 * 1.1 (the "License"); you may not use this file except in compliance with
   6 * the License. You may obtain a copy of the License at
   7 * http://www.mozilla.org/MPL/
   8 *
   9 * Software distributed under the License is distributed on an "AS IS" basis,
  10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11 * for the specific language governing rights and limitations under the
  12 * License.
  13 *
  14 * The Original Code is the Netscape security libraries.
  15 *
  16 * The Initial Developer of the Original Code is
  17 * Netscape Communications Corporation.
  18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
  19 * the Initial Developer. All Rights Reserved.
  20 *
  21 * Contributor(s):
  22 *
  23 * Alternatively, the contents of this file may be used under the terms of
  24 * either the GNU General Public License Version 2 or later (the "GPL"), or
  25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26 * in which case the provisions of the GPL or the LGPL are applicable instead
  27 * of those above. If you wish to allow use of your version of this file only
  28 * under the terms of either the GPL or the LGPL, and not to allow others to
  29 * use your version of this file under the terms of the MPL, indicate your
  30 * decision by deleting the provisions above and replace them with the notice
  31 * and other provisions required by the GPL or the LGPL. If you do not delete
  32 * the provisions above, a recipient may use your version of this file under
  33 * the terms of any one of the MPL, the GPL or the LGPL.
  34 *
  35 * ***** END LICENSE BLOCK ***** */
  36
  37#ifndef NSSCKFWC_H
  38#define NSSCKFWC_H
  39
  40#ifdef DEBUG
  41static const char NSSCKFWC_CVS_ID[] = "@(#) $RCSfile: nssckfwc.h,v $ $Revision: 1.3 $ $Date: 2005/01/20 02:25:45 $";
  42#endif /* DEBUG */
  43
  44/*
  45 * nssckfwc.h
  46 *
  47 * This file prototypes all of the NSS Cryptoki Framework "wrapper" 
  48 * which implement the PKCS#11 API.  Technically, these are public
  49 * routines (with capital "NSS" prefixes), since they are called
  50 * from (generated) code within a Module using the Framework.
  51 * However, they should not be called except from those generated
  52 * calls.  Hence, the prototypes have been split out into this file.
  53 */
  54
  55#ifndef NSSCKT_H
  56#include "nssckt.h"
  57#endif /* NSSCKT_H */
  58
  59#ifndef NSSCKFWT_H
  60#include "nssckfwt.h"
  61#endif /* NSSCKFWT_H */
  62
  63#ifndef NSSCKMDT_H
  64#include "nssckmdt.h"
  65#endif /* NSSCKMDT_H */
  66
  67/*
  68 * NSSCKFWC_Initialize
  69 * NSSCKFWC_Finalize
  70 * NSSCKFWC_GetInfo
  71 * -- NSSCKFWC_GetFunctionList -- see the API insert file
  72 * NSSCKFWC_GetSlotList
  73 * NSSCKFWC_GetSlotInfo
  74 * NSSCKFWC_GetTokenInfo
  75 * NSSCKFWC_WaitForSlotEvent
  76 * NSSCKFWC_GetMechanismList
  77 * NSSCKFWC_GetMechanismInfo
  78 * NSSCKFWC_InitToken
  79 * NSSCKFWC_InitPIN
  80 * NSSCKFWC_SetPIN
  81 * NSSCKFWC_OpenSession
  82 * NSSCKFWC_CloseSession
  83 * NSSCKFWC_CloseAllSessions
  84 * NSSCKFWC_GetSessionInfo
  85 * NSSCKFWC_GetOperationState
  86 * NSSCKFWC_SetOperationState
  87 * NSSCKFWC_Login
  88 * NSSCKFWC_Logout
  89 * NSSCKFWC_CreateObject
  90 * NSSCKFWC_CopyObject
  91 * NSSCKFWC_DestroyObject
  92 * NSSCKFWC_GetObjectSize
  93 * NSSCKFWC_GetAttributeValue
  94 * NSSCKFWC_SetAttributeValue
  95 * NSSCKFWC_FindObjectsInit
  96 * NSSCKFWC_FindObjects
  97 * NSSCKFWC_FindObjectsFinal
  98 * NSSCKFWC_EncryptInit
  99 * NSSCKFWC_Encrypt
 100 * NSSCKFWC_EncryptUpdate
 101 * NSSCKFWC_EncryptFinal
 102 * NSSCKFWC_DecryptInit
 103 * NSSCKFWC_Decrypt
 104 * NSSCKFWC_DecryptUpdate
 105 * NSSCKFWC_DecryptFinal
 106 * NSSCKFWC_DigestInit
 107 * NSSCKFWC_Digest
 108 * NSSCKFWC_DigestUpdate
 109 * NSSCKFWC_DigestKey
 110 * NSSCKFWC_DigestFinal
 111 * NSSCKFWC_SignInit
 112 * NSSCKFWC_Sign
 113 * NSSCKFWC_SignUpdate
 114 * NSSCKFWC_SignFinal
 115 * NSSCKFWC_SignRecoverInit
 116 * NSSCKFWC_SignRecover
 117 * NSSCKFWC_VerifyInit
 118 * NSSCKFWC_Verify
 119 * NSSCKFWC_VerifyUpdate
 120 * NSSCKFWC_VerifyFinal
 121 * NSSCKFWC_VerifyRecoverInit
 122 * NSSCKFWC_VerifyRecover
 123 * NSSCKFWC_DigestEncryptUpdate
 124 * NSSCKFWC_DecryptDigestUpdate
 125 * NSSCKFWC_SignEncryptUpdate
 126 * NSSCKFWC_DecryptVerifyUpdate
 127 * NSSCKFWC_GenerateKey
 128 * NSSCKFWC_GenerateKeyPair
 129 * NSSCKFWC_WrapKey
 130 * NSSCKFWC_UnwrapKey
 131 * NSSCKFWC_DeriveKey
 132 * NSSCKFWC_SeedRandom
 133 * NSSCKFWC_GenerateRandom
 134 * NSSCKFWC_GetFunctionStatus
 135 * NSSCKFWC_CancelFunction
 136 */
 137
 138/*
 139 * NSSCKFWC_Initialize
 140 *
 141 */
 142NSS_EXTERN CK_RV
 143NSSCKFWC_Initialize
 144(
 145  NSSCKFWInstance **pFwInstance,
 146  NSSCKMDInstance *mdInstance,
 147  CK_VOID_PTR pInitArgs
 148);
 149
 150/*
 151 * NSSCKFWC_Finalize
 152 *
 153 */
 154NSS_EXTERN CK_RV
 155NSSCKFWC_Finalize
 156(
 157  NSSCKFWInstance **pFwInstance
 158);
 159
 160/*
 161 * NSSCKFWC_GetInfo
 162 *
 163 */
 164NSS_EXTERN CK_RV
 165NSSCKFWC_GetInfo
 166(
 167  NSSCKFWInstance *fwInstance,
 168  CK_INFO_PTR pInfo
 169);
 170  
 171/*
 172 * C_GetFunctionList is implemented entirely in the Module's file which
 173 * includes the Framework API insert file.  It requires no "actual"
 174 * NSSCKFW routine.
 175 */
 176
 177/*
 178 * NSSCKFWC_GetSlotList
 179 *
 180 */
 181NSS_EXTERN CK_RV
 182NSSCKFWC_GetSlotList
 183(
 184  NSSCKFWInstance *fwInstance,
 185  CK_BBOOL tokenPresent,
 186  CK_SLOT_ID_PTR pSlotList,
 187  CK_ULONG_PTR pulCount
 188);
 189 
 190/*
 191 * NSSCKFWC_GetSlotInfo
 192 *
 193 */
 194NSS_EXTERN CK_RV
 195NSSCKFWC_GetSlotInfo
 196(
 197  NSSCKFWInstance *fwInstance,
 198  CK_SLOT_ID slotID,
 199  CK_SLOT_INFO_PTR pInfo
 200);
 201
 202/*
 203 * NSSCKFWC_GetTokenInfo
 204 *
 205 */
 206NSS_EXTERN CK_RV
 207NSSCKFWC_GetTokenInfo
 208(
 209  NSSCKFWInstance *fwInstance,
 210  CK_SLOT_ID slotID,
 211  CK_TOKEN_INFO_PTR pInfo
 212);
 213
 214/*
 215 * NSSCKFWC_WaitForSlotEvent
 216 *
 217 */
 218NSS_EXTERN CK_RV
 219NSSCKFWC_WaitForSlotEvent
 220(
 221  NSSCKFWInstance *fwInstance,
 222  CK_FLAGS flags,
 223  CK_SLOT_ID_PTR pSlot,
 224  CK_VOID_PTR pReserved
 225);
 226
 227/*
 228 * NSSCKFWC_GetMechanismList
 229 *
 230 */
 231NSS_EXTERN CK_RV
 232NSSCKFWC_GetMechanismList
 233(
 234  NSSCKFWInstance *fwInstance,
 235  CK_SLOT_ID slotID,
 236  CK_MECHANISM_TYPE_PTR pMechanismList,
 237  CK_ULONG_PTR pulCount
 238);
 239
 240/*
 241 * NSSCKFWC_GetMechanismInfo
 242 *
 243 */
 244NSS_EXTERN CK_RV
 245NSSCKFWC_GetMechanismInfo
 246(
 247  NSSCKFWInstance *fwInstance,
 248  CK_SLOT_ID slotID,
 249  CK_MECHANISM_TYPE type,
 250  CK_MECHANISM_INFO_PTR pInfo
 251);
 252
 253/*
 254 * NSSCKFWC_InitToken
 255 *
 256 */
 257NSS_EXTERN CK_RV
 258NSSCKFWC_InitToken
 259(
 260  NSSCKFWInstance *fwInstance,
 261  CK_SLOT_ID slotID,
 262  CK_CHAR_PTR pPin,
 263  CK_ULONG ulPinLen,
 264  CK_CHAR_PTR pLabel
 265);
 266
 267/*
 268 * NSSCKFWC_InitPIN
 269 *
 270 */
 271NSS_EXTERN CK_RV
 272NSSCKFWC_InitPIN
 273(
 274  NSSCKFWInstance *fwInstance,
 275  CK_SESSION_HANDLE hSession,
 276  CK_CHAR_PTR pPin,
 277  CK_ULONG ulPinLen
 278);
 279
 280/*
 281 * NSSCKFWC_SetPIN
 282 *
 283 */
 284NSS_EXTERN CK_RV
 285NSSCKFWC_SetPIN
 286(
 287  NSSCKFWInstance *fwInstance,
 288  CK_SESSION_HANDLE hSession,
 289  CK_CHAR_PTR pOldPin,
 290  CK_ULONG ulOldLen,
 291  CK_CHAR_PTR pNewPin,
 292  CK_ULONG ulNewLen
 293);
 294
 295/*
 296 * NSSCKFWC_OpenSession
 297 *
 298 */
 299NSS_EXTERN CK_RV
 300NSSCKFWC_OpenSession
 301(
 302  NSSCKFWInstance *fwInstance,
 303  CK_SLOT_ID slotID,
 304  CK_FLAGS flags,
 305  CK_VOID_PTR pApplication,
 306  CK_NOTIFY Notify,
 307  CK_SESSION_HANDLE_PTR phSession
 308);
 309
 310/*
 311 * NSSCKFWC_CloseSession
 312 *
 313 */
 314NSS_EXTERN CK_RV
 315NSSCKFWC_CloseSession
 316(
 317  NSSCKFWInstance *fwInstance,
 318  CK_SESSION_HANDLE hSession
 319);
 320
 321/*
 322 * NSSCKFWC_CloseAllSessions
 323 *
 324 */
 325NSS_EXTERN CK_RV
 326NSSCKFWC_CloseAllSessions
 327(
 328  NSSCKFWInstance *fwInstance,
 329  CK_SLOT_ID slotID
 330);
 331
 332/*
 333 * NSSCKFWC_GetSessionInfo
 334 *
 335 */
 336NSS_EXTERN CK_RV
 337NSSCKFWC_GetSessionInfo
 338(
 339  NSSCKFWInstance *fwInstance,
 340  CK_SESSION_HANDLE hSession,
 341  CK_SESSION_INFO_PTR pInfo
 342);
 343
 344/*
 345 * NSSCKFWC_GetOperationState
 346 *
 347 */
 348NSS_EXTERN CK_RV
 349NSSCKFWC_GetOperationState
 350(
 351  NSSCKFWInstance *fwInstance,
 352  CK_SESSION_HANDLE hSession,
 353  CK_BYTE_PTR pOperationState,
 354  CK_ULONG_PTR pulOperationStateLen
 355);
 356
 357/*
 358 * NSSCKFWC_SetOperationState
 359 *
 360 */
 361NSS_EXTERN CK_RV
 362NSSCKFWC_SetOperationState
 363(
 364  NSSCKFWInstance *fwInstance,
 365  CK_SESSION_HANDLE hSession,
 366  CK_BYTE_PTR pOperationState,
 367  CK_ULONG ulOperationStateLen,
 368  CK_OBJECT_HANDLE hEncryptionKey,
 369  CK_OBJECT_HANDLE hAuthenticationKey
 370);
 371
 372/*
 373 * NSSCKFWC_Login
 374 *
 375 */
 376NSS_EXTERN CK_RV
 377NSSCKFWC_Login
 378(
 379  NSSCKFWInstance *fwInstance,
 380  CK_SESSION_HANDLE hSession,
 381  CK_USER_TYPE userType,
 382  CK_CHAR_PTR pPin,
 383  CK_ULONG ulPinLen
 384);
 385
 386/*
 387 * NSSCKFWC_Logout
 388 *
 389 */
 390NSS_EXTERN CK_RV
 391NSSCKFWC_Logout
 392(
 393  NSSCKFWInstance *fwInstance,
 394  CK_SESSION_HANDLE hSession
 395);
 396
 397/*
 398 * NSSCKFWC_CreateObject
 399 *
 400 */
 401NSS_EXTERN CK_RV
 402NSSCKFWC_CreateObject
 403(
 404  NSSCKFWInstance *fwInstance,
 405  CK_SESSION_HANDLE hSession,
 406  CK_ATTRIBUTE_PTR pTemplate,
 407  CK_ULONG ulCount,
 408  CK_OBJECT_HANDLE_PTR phObject
 409);
 410
 411/*
 412 * NSSCKFWC_CopyObject
 413 *
 414 */
 415NSS_EXTERN CK_RV
 416NSSCKFWC_CopyObject
 417(
 418  NSSCKFWInstance *fwInstance,
 419  CK_SESSION_HANDLE hSession,
 420  CK_OBJECT_HANDLE hObject,
 421  CK_ATTRIBUTE_PTR pTemplate,
 422  CK_ULONG ulCount,
 423  CK_OBJECT_HANDLE_PTR phNewObject
 424);
 425
 426/*
 427 * NSSCKFWC_DestroyObject
 428 *
 429 */
 430NSS_EXTERN CK_RV
 431NSSCKFWC_DestroyObject
 432(
 433  NSSCKFWInstance *fwInstance,
 434  CK_SESSION_HANDLE hSession,
 435  CK_OBJECT_HANDLE hObject
 436);
 437
 438/*
 439 * NSSCKFWC_GetObjectSize
 440 *
 441 */
 442NSS_EXTERN CK_RV
 443NSSCKFWC_GetObjectSize
 444(
 445  NSSCKFWInstance *fwInstance,
 446  CK_SESSION_HANDLE hSession,
 447  CK_OBJECT_HANDLE hObject,
 448  CK_ULONG_PTR pulSize
 449);
 450
 451/*
 452 * NSSCKFWC_GetAttributeValue
 453 *
 454 */
 455NSS_EXTERN CK_RV
 456NSSCKFWC_GetAttributeValue
 457(
 458  NSSCKFWInstance *fwInstance,
 459  CK_SESSION_HANDLE hSession,
 460  CK_OBJECT_HANDLE hObject,
 461  CK_ATTRIBUTE_PTR pTemplate,
 462  CK_ULONG ulCount
 463);
 464  
 465/*
 466 * NSSCKFWC_SetAttributeValue
 467 *
 468 */
 469NSS_EXTERN CK_RV
 470NSSCKFWC_SetAttributeValue
 471(
 472  NSSCKFWInstance *fwInstance,
 473  CK_SESSION_HANDLE hSession,
 474  CK_OBJECT_HANDLE hObject,
 475  CK_ATTRIBUTE_PTR pTemplate,
 476  CK_ULONG ulCount
 477);
 478
 479/*
 480 * NSSCKFWC_FindObjectsInit
 481 *
 482 */
 483NSS_EXTERN CK_RV
 484NSSCKFWC_FindObjectsInit
 485(
 486  NSSCKFWInstance *fwInstance,
 487  CK_SESSION_HANDLE hSession,
 488  CK_ATTRIBUTE_PTR pTemplate,
 489  CK_ULONG ulCount
 490);
 491
 492/*
 493 * NSSCKFWC_FindObjects
 494 *
 495 */
 496NSS_EXTERN CK_RV
 497NSSCKFWC_FindObjects
 498(
 499  NSSCKFWInstance *fwInstance,
 500  CK_SESSION_HANDLE hSession,
 501  CK_OBJECT_HANDLE_PTR phObject,
 502  CK_ULONG ulMaxObjectCount,
 503  CK_ULONG_PTR pulObjectCount
 504);
 505
 506/*
 507 * NSSCKFWC_FindObjectsFinal
 508 *
 509 */
 510NSS_EXTERN CK_RV
 511NSSCKFWC_FindObjectsFinal
 512(
 513  NSSCKFWInstance *fwInstance,
 514  CK_SESSION_HANDLE hSession
 515);
 516
 517/*
 518 * NSSCKFWC_EncryptInit
 519 *
 520 */
 521NSS_EXTERN CK_RV
 522NSSCKFWC_EncryptInit
 523(
 524  NSSCKFWInstance *fwInstance,
 525  CK_SESSION_HANDLE hSession,
 526  CK_MECHANISM_PTR pMechanism,
 527  CK_OBJECT_HANDLE hKey
 528);
 529
 530/*
 531 * NSSCKFWC_Encrypt
 532 *
 533 */
 534NSS_EXTERN CK_RV
 535NSSCKFWC_Encrypt
 536(
 537  NSSCKFWInstance *fwInstance,
 538  CK_SESSION_HANDLE hSession,
 539  CK_BYTE_PTR pData,
 540  CK_ULONG ulDataLen,
 541  CK_BYTE_PTR pEncryptedData,
 542  CK_ULONG_PTR pulEncryptedDataLen
 543);
 544
 545/*
 546 * NSSCKFWC_EncryptUpdate
 547 *
 548 */
 549NSS_EXTERN CK_RV
 550NSSCKFWC_EncryptUpdate
 551(
 552  NSSCKFWInstance *fwInstance,
 553  CK_SESSION_HANDLE hSession,
 554  CK_BYTE_PTR pPart,
 555  CK_ULONG ulPartLen,
 556  CK_BYTE_PTR pEncryptedPart,
 557  CK_ULONG_PTR pulEncryptedPartLen
 558);
 559
 560/*
 561 * NSSCKFWC_EncryptFinal
 562 *
 563 */
 564NSS_EXTERN CK_RV
 565NSSCKFWC_EncryptFinal
 566(
 567  NSSCKFWInstance *fwInstance,
 568  CK_SESSION_HANDLE hSession,
 569  CK_BYTE_PTR pLastEncryptedPart,
 570  CK_ULONG_PTR pulLastEncryptedPartLen
 571);
 572
 573/*
 574 * NSSCKFWC_DecryptInit
 575 *
 576 */
 577NSS_EXTERN CK_RV
 578NSSCKFWC_DecryptInit
 579(
 580  NSSCKFWInstance *fwInstance,
 581  CK_SESSION_HANDLE hSession,
 582  CK_MECHANISM_PTR pMechanism,
 583  CK_OBJECT_HANDLE hKey
 584);
 585
 586/*
 587 * NSSCKFWC_Decrypt
 588 *
 589 */
 590NSS_EXTERN CK_RV
 591NSSCKFWC_Decrypt
 592(
 593  NSSCKFWInstance *fwInstance,
 594  CK_SESSION_HANDLE hSession,
 595  CK_BYTE_PTR pEncryptedData,
 596  CK_ULONG ulEncryptedDataLen,
 597  CK_BYTE_PTR pData,
 598  CK_ULONG_PTR pulDataLen
 599);
 600
 601/*
 602 * NSSCKFWC_DecryptUpdate
 603 *
 604 */
 605NSS_EXTERN CK_RV
 606NSSCKFWC_DecryptUpdate
 607(
 608  NSSCKFWInstance *fwInstance,
 609  CK_SESSION_HANDLE hSession,
 610  CK_BYTE_PTR pEncryptedPart,
 611  CK_ULONG ulEncryptedPartLen,
 612  CK_BYTE_PTR pPart,
 613  CK_ULONG_PTR pulPartLen
 614);
 615
 616/*
 617 * NSSCKFWC_DecryptFinal
 618 *
 619 */
 620NSS_EXTERN CK_RV
 621NSSCKFWC_DecryptFinal
 622(
 623  NSSCKFWInstance *fwInstance,
 624  CK_SESSION_HANDLE hSession,
 625  CK_BYTE_PTR pLastPart,
 626  CK_ULONG_PTR pulLastPartLen
 627);
 628
 629/*
 630 * NSSCKFWC_DigestInit
 631 *
 632 */
 633NSS_EXTERN CK_RV
 634NSSCKFWC_DigestInit
 635(
 636  NSSCKFWInstance *fwInstance,
 637  CK_SESSION_HANDLE hSession,
 638  CK_MECHANISM_PTR pMechanism
 639);
 640
 641/*
 642 * NSSCKFWC_Digest
 643 *
 644 */
 645NSS_EXTERN CK_RV
 646NSSCKFWC_Digest
 647(
 648  NSSCKFWInstance *fwInstance,
 649  CK_SESSION_HANDLE hSession,
 650  CK_BYTE_PTR pData,
 651  CK_ULONG ulDataLen,
 652  CK_BYTE_PTR pDigest,
 653  CK_ULONG_PTR pulDigestLen
 654);
 655
 656/*
 657 * NSSCKFWC_DigestUpdate
 658 *
 659 */
 660NSS_EXTERN CK_RV
 661NSSCKFWC_DigestUpdate
 662(
 663  NSSCKFWInstance *fwInstance,
 664  CK_SESSION_HANDLE hSession,
 665  CK_BYTE_PTR pData,
 666  CK_ULONG ulDataLen
 667);
 668
 669/*
 670 * NSSCKFWC_DigestKey
 671 *
 672 */
 673NSS_EXTERN CK_RV
 674NSSCKFWC_DigestKey
 675(
 676  NSSCKFWInstance *fwInstance,
 677  CK_SESSION_HANDLE hSession,
 678  CK_OBJECT_HANDLE hKey
 679);
 680
 681/*
 682 * NSSCKFWC_DigestFinal
 683 *
 684 */
 685NSS_EXTERN CK_RV
 686NSSCKFWC_DigestFinal
 687(
 688  NSSCKFWInstance *fwInstance,
 689  CK_SESSION_HANDLE hSession,
 690  CK_BYTE_PTR pDigest,
 691  CK_ULONG_PTR pulDigestLen
 692);
 693
 694/*
 695 * NSSCKFWC_SignInit
 696 *
 697 */
 698NSS_EXTERN CK_RV
 699NSSCKFWC_SignInit
 700(
 701  NSSCKFWInstance *fwInstance,
 702  CK_SESSION_HANDLE hSession,
 703  CK_MECHANISM_PTR pMechanism,
 704  CK_OBJECT_HANDLE hKey
 705);
 706
 707/*
 708 * NSSCKFWC_Sign
 709 *
 710 */
 711NSS_EXTERN CK_RV
 712NSSCKFWC_Sign
 713(
 714  NSSCKFWInstance *fwInstance,
 715  CK_SESSION_HANDLE hSession,
 716  CK_BYTE_PTR pData,
 717  CK_ULONG ulDataLen,
 718  CK_BYTE_PTR pSignature,
 719  CK_ULONG_PTR pulSignatureLen
 720);
 721
 722/*
 723 * NSSCKFWC_SignUpdate
 724 *
 725 */
 726NSS_EXTERN CK_RV
 727NSSCKFWC_SignUpdate
 728(
 729  NSSCKFWInstance *fwInstance,
 730  CK_SESSION_HANDLE hSession,
 731  CK_BYTE_PTR pPart,
 732  CK_ULONG ulPartLen
 733);
 734
 735/*
 736 * NSSCKFWC_SignFinal
 737 *
 738 */
 739NSS_EXTERN CK_RV
 740NSSCKFWC_SignFinal
 741(
 742  NSSCKFWInstance *fwInstance,
 743  CK_SESSION_HANDLE hSession,
 744  CK_BYTE_PTR pSignature,
 745  CK_ULONG_PTR pulSignatureLen
 746);
 747
 748/*
 749 * NSSCKFWC_SignRecoverInit
 750 *
 751 */
 752NSS_EXTERN CK_RV
 753NSSCKFWC_SignRecoverInit
 754(
 755  NSSCKFWInstance *fwInstance,
 756  CK_SESSION_HANDLE hSession,
 757  CK_MECHANISM_PTR pMechanism,
 758  CK_OBJECT_HANDLE hKey
 759);
 760
 761/*
 762 * NSSCKFWC_SignRecover
 763 *
 764 */
 765NSS_EXTERN CK_RV
 766NSSCKFWC_SignRecover
 767(
 768  NSSCKFWInstance *fwInstance,
 769  CK_SESSION_HANDLE hSession,
 770  CK_BYTE_PTR pData,
 771  CK_ULONG ulDataLen,
 772  CK_BYTE_PTR pSignature,
 773  CK_ULONG_PTR pulSignatureLen
 774);
 775
 776/*
 777 * NSSCKFWC_VerifyInit
 778 *
 779 */
 780NSS_EXTERN CK_RV
 781NSSCKFWC_VerifyInit
 782(
 783  NSSCKFWInstance *fwInstance,
 784  CK_SESSION_HANDLE hSession,
 785  CK_MECHANISM_PTR pMechanism,
 786  CK_OBJECT_HANDLE hKey
 787);
 788
 789/*
 790 * NSSCKFWC_Verify
 791 *
 792 */
 793NSS_EXTERN CK_RV
 794NSSCKFWC_Verify
 795(
 796  NSSCKFWInstance *fwInstance,
 797  CK_SESSION_HANDLE hSession,
 798  CK_BYTE_PTR pData,
 799  CK_ULONG ulDataLen,
 800  CK_BYTE_PTR pSignature,
 801  CK_ULONG ulSignatureLen
 802);
 803
 804/*
 805 * NSSCKFWC_VerifyUpdate
 806 *
 807 */
 808NSS_EXTERN CK_RV
 809NSSCKFWC_VerifyUpdate
 810(
 811  NSSCKFWInstance *fwInstance,
 812  CK_SESSION_HANDLE hSession,
 813  CK_BYTE_PTR pPart,
 814  CK_ULONG ulPartLen
 815);
 816
 817/*
 818 * NSSCKFWC_VerifyFinal
 819 *
 820 */
 821NSS_EXTERN CK_RV
 822NSSCKFWC_VerifyFinal
 823(
 824  NSSCKFWInstance *fwInstance,
 825  CK_SESSION_HANDLE hSession,
 826  CK_BYTE_PTR pSignature,
 827  CK_ULONG ulSignatureLen
 828);
 829
 830/*
 831 * NSSCKFWC_VerifyRecoverInit
 832 *
 833 */
 834NSS_EXTERN CK_RV
 835NSSCKFWC_VerifyRecoverInit
 836(
 837  NSSCKFWInstance *fwInstance,
 838  CK_SESSION_HANDLE hSession,
 839  CK_MECHANISM_PTR pMechanism,
 840  CK_OBJECT_HANDLE hKey
 841);
 842
 843/*
 844 * NSSCKFWC_VerifyRecover
 845 *
 846 */
 847NSS_EXTERN CK_RV
 848NSSCKFWC_VerifyRecover
 849(
 850  NSSCKFWInstance *fwInstance,
 851  CK_SESSION_HANDLE hSession,
 852  CK_BYTE_PTR pSignature,
 853  CK_ULONG ulSignatureLen,
 854  CK_BYTE_PTR pData,
 855  CK_ULONG_PTR pulDataLen
 856);
 857
 858/*
 859 * NSSCKFWC_DigestEncryptUpdate
 860 *
 861 */
 862NSS_EXTERN CK_RV
 863NSSCKFWC_DigestEncryptUpdate
 864(
 865  NSSCKFWInstance *fwInstance,
 866  CK_SESSION_HANDLE hSession,
 867  CK_BYTE_PTR pPart,
 868  CK_ULONG ulPartLen,
 869  CK_BYTE_PTR pEncryptedPart,
 870  CK_ULONG_PTR pulEncryptedPartLen
 871);
 872
 873/*
 874 * NSSCKFWC_DecryptDigestUpdate
 875 *
 876 */
 877NSS_EXTERN CK_RV
 878NSSCKFWC_DecryptDigestUpdate
 879(
 880  NSSCKFWInstance *fwInstance,
 881  CK_SESSION_HANDLE hSession,
 882  CK_BYTE_PTR pEncryptedPart,
 883  CK_ULONG ulEncryptedPartLen,
 884  CK_BYTE_PTR pPart,
 885  CK_ULONG_PTR pulPartLen
 886);
 887
 888/*
 889 * NSSCKFWC_SignEncryptUpdate
 890 *
 891 */
 892NSS_EXTERN CK_RV
 893NSSCKFWC_SignEncryptUpdate
 894(
 895  NSSCKFWInstance *fwInstance,
 896  CK_SESSION_HANDLE hSession,
 897  CK_BYTE_PTR pPart,
 898  CK_ULONG ulPartLen,
 899  CK_BYTE_PTR pEncryptedPart,
 900  CK_ULONG_PTR pulEncryptedPartLen
 901);
 902
 903/*
 904 * NSSCKFWC_DecryptVerifyUpdate
 905 *
 906 */
 907NSS_EXTERN CK_RV
 908NSSCKFWC_DecryptVerifyUpdate
 909(
 910  NSSCKFWInstance *fwInstance,
 911  CK_SESSION_HANDLE hSession,
 912  CK_BYTE_PTR pEncryptedPart,
 913  CK_ULONG ulEncryptedPartLen,
 914  CK_BYTE_PTR pPart,
 915  CK_ULONG_PTR pulPartLen
 916);
 917
 918/*
 919 * NSSCKFWC_GenerateKey
 920 *
 921 */
 922NSS_EXTERN CK_RV
 923NSSCKFWC_GenerateKey
 924(
 925  NSSCKFWInstance *fwInstance,
 926  CK_SESSION_HANDLE hSession,
 927  CK_MECHANISM_PTR pMechanism,
 928  CK_ATTRIBUTE_PTR pTemplate,
 929  CK_ULONG ulCount,
 930  CK_OBJECT_HANDLE_PTR phKey
 931);
 932
 933/*
 934 * NSSCKFWC_GenerateKeyPair
 935 *
 936 */
 937NSS_EXTERN CK_RV
 938NSSCKFWC_GenerateKeyPair
 939(
 940  NSSCKFWInstance *fwInstance,
 941  CK_SESSION_HANDLE hSession,
 942  CK_MECHANISM_PTR pMechanism,
 943  CK_ATTRIBUTE_PTR pPublicKeyTemplate,
 944  CK_ULONG ulPublicKeyAttributeCount,
 945  CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
 946  CK_ULONG ulPrivateKeyAttributeCount,
 947  CK_OBJECT_HANDLE_PTR phPublicKey,
 948  CK_OBJECT_HANDLE_PTR phPrivateKey
 949);
 950
 951/*
 952 * NSSCKFWC_WrapKey
 953 *
 954 */
 955NSS_EXTERN CK_RV
 956NSSCKFWC_WrapKey
 957(
 958  NSSCKFWInstance *fwInstance,
 959  CK_SESSION_HANDLE hSession,
 960  CK_MECHANISM_PTR pMechanism,
 961  CK_OBJECT_HANDLE hWrappingKey,
 962  CK_OBJECT_HANDLE hKey,
 963  CK_BYTE_PTR pWrappedKey,
 964  CK_ULONG_PTR pulWrappedKeyLen
 965);
 966
 967/*
 968 * NSSCKFWC_UnwrapKey
 969 *
 970 */
 971NSS_EXTERN CK_RV
 972NSSCKFWC_UnwrapKey
 973(
 974  NSSCKFWInstance *fwInstance,
 975  CK_SESSION_HANDLE hSession,
 976  CK_MECHANISM_PTR pMechanism,
 977  CK_OBJECT_HANDLE hUnwrappingKey,
 978  CK_BYTE_PTR pWrappedKey,
 979  CK_ULONG ulWrappedKeyLen,
 980  CK_ATTRIBUTE_PTR pTemplate,
 981  CK_ULONG ulAttributeCount,
 982  CK_OBJECT_HANDLE_PTR phKey
 983);
 984
 985/*
 986 * NSSCKFWC_DeriveKey
 987 *
 988 */
 989NSS_EXTERN CK_RV
 990NSSCKFWC_DeriveKey
 991(
 992  NSSCKFWInstance *fwInstance,
 993  CK_SESSION_HANDLE hSession,
 994  CK_MECHANISM_PTR pMechanism,
 995  CK_OBJECT_HANDLE hBaseKey,
 996  CK_ATTRIBUTE_PTR pTemplate,
 997  CK_ULONG ulAttributeCount,
 998  CK_OBJECT_HANDLE_PTR phKey
 999);
1000
1001/*
1002 * NSSCKFWC_SeedRandom
1003 *
1004 */
1005NSS_EXTERN CK_RV
1006NSSCKFWC_SeedRandom
1007(
1008  NSSCKFWInstance *fwInstance,
1009  CK_SESSION_HANDLE hSession,
1010  CK_BYTE_PTR pSeed,
1011  CK_ULONG ulSeedLen
1012);
1013
1014/*
1015 * NSSCKFWC_GenerateRandom
1016 *
1017 */
1018NSS_EXTERN CK_RV
1019NSSCKFWC_GenerateRandom
1020(
1021  NSSCKFWInstance *fwInstance,
1022  CK_SESSION_HANDLE hSession,
1023  CK_BYTE_PTR pRandomData,
1024  CK_ULONG ulRandomLen
1025);
1026
1027/*
1028 * NSSCKFWC_GetFunctionStatus
1029 *
1030 */
1031NSS_EXTERN CK_RV
1032NSSCKFWC_GetFunctionStatus
1033(
1034  NSSCKFWInstance *fwInstance,
1035  CK_SESSION_HANDLE hSession
1036);
1037
1038/*
1039 * NSSCKFWC_CancelFunction
1040 *
1041 */
1042NSS_EXTERN CK_RV
1043NSSCKFWC_CancelFunction
1044(
1045  NSSCKFWInstance *fwInstance,
1046  CK_SESSION_HANDLE hSession
1047);
1048
1049#endif /* NSSCKFWC_H */