1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>XML-Security-C: XSECCryptoKeyRSA Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>XSECCryptoKeyRSA Class Reference<br>
<small>
[<a class="el" href="group__crypto.html">Cryptographic Abstraction Layer</a>]</small>
</h1><code>#include <<a class="el" href="XSECCryptoKeyRSA_8hpp-source.html">XSECCryptoKeyRSA.hpp</a>></code>
<p>
Inheritance diagram for XSECCryptoKeyRSA:<p><center><img src="classXSECCryptoKeyRSA__inherit__graph.png" border="0" usemap="#XSECCryptoKeyRSA__inherit__map" alt="Inheritance graph"></center>
<map name="XSECCryptoKeyRSA__inherit__map">
<area href="classOpenSSLCryptoKeyRSA.html" shape="rect" coords="8,158,178,182" alt="">
<area href="classWinCAPICryptoKeyRSA.html" shape="rect" coords="202,158,370,182" alt="">
<area href="classXSECCryptoKey.html" shape="rect" coords="128,9,250,33" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for XSECCryptoKeyRSA:<p><center><img src="classXSECCryptoKeyRSA__coll__graph.png" border="0" usemap="#XSECCryptoKeyRSA__coll__map" alt="Collaboration graph"></center>
<map name="XSECCryptoKeyRSA__coll__map">
<area href="classXSECCryptoKey.html" shape="rect" coords="21,9,143,33" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classXSECCryptoKeyRSA-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Interface class for RSA keys.
<p>
The library uses classes derived from this to process RSA keys.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#w3">PaddingType</a> { <br>
<a class="el" href="classXSECCryptoKeyRSA.html#w3w0">PAD_NONE</a> = 0,
<br>
<a class="el" href="classXSECCryptoKeyRSA.html#w3w1">PAD_PKCS_1_5</a> = 1,
<br>
<a class="el" href="classXSECCryptoKeyRSA.html#w3w2">PAD_OAEP_MGFP1</a> = 2
<br>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Padding type. <a href="classXSECCryptoKeyRSA.html#w3">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Constructors and Destructors</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z166_0">XSECCryptoKeyRSA</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z166_1">~XSECCryptoKeyRSA</a> ()</td></tr>
<tr><td colspan="2"><div class="groupHeader">Key Interface methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classXSECCryptoKey.html#w9">XSECCryptoKey::KeyType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z167_0">getKeyType</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the type of this key. <a href="#z167_0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classXSECCryptoKey.html">XSECCryptoKey</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z167_1">clone</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Replicate key. <a href="#z167_1"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Mandatory RSA interface methods</div></td></tr>
<tr><td colspan="2"><div class="groupText">These classes are required by the library. <br><br></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_0">setOAEPparams</a> (unsigned char *params, unsigned int paramsLen)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the OAEPparams string. <a href="#z168_0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_1">getOAEPparamsLen</a> (void)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get OAEPparams Length. <a href="#z168_1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_2">getOAEPparams</a> (void)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the OAEPparams. <a href="#z168_2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_3">verifySHA1PKCS1Base64Signature</a> (const unsigned char *hashBuf, unsigned int hashLen, const char *base64Signature, unsigned int sigLen)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Verify a SHA1 PKCS1 encoded signature. <a href="#z168_3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_4">signSHA1PKCS1Base64Signature</a> (unsigned char *hashBuf, unsigned int hashLen, char *base64SignatureBuf, unsigned int base64SignatureBufLen)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a signature. <a href="#z168_4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_5">privateDecrypt</a> (const unsigned char *inBuf, unsigned char *plainBuf, unsigned int inLength, unsigned int maxOutLength, <a class="el" href="classXSECCryptoKeyRSA.html#w3">PaddingType</a> padding, <a class="el" href="DSIGConstants_8hpp.html#a104">hashMethod</a> hm)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Decrypt using private key. <a href="#z168_5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_6">publicEncrypt</a> (const unsigned char *inBuf, unsigned char *cipherBuf, unsigned int inLength, unsigned int maxOutLength, <a class="el" href="classXSECCryptoKeyRSA.html#w3">PaddingType</a> padding, <a class="el" href="DSIGConstants_8hpp.html#a104">hashMethod</a> hm)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Encrypt using a public key. <a href="#z168_6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z168_7">getLength</a> (void)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain the length of an RSA key. <a href="#z168_7"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Optional Interface methods</div></td></tr>
<tr><td colspan="2"><div class="groupText">These functions do not necessarily have to be implmented. They are used by <a class="el" href="classXSECKeyInfoResolverDefault.html">XSECKeyInfoResolverDefault</a> to try to create a key from KeyInfo elements without knowing anything else.<p>
If an interface class does not implement these functions, a simple stub that does nothing should be used. <br><br></div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z169_0">loadPublicModulusBase64BigNums</a> (const char *b64, unsigned int len)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load the modulus. <a href="#z169_0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classXSECCryptoKeyRSA.html#z169_1">loadPublicExponentBase64BigNums</a> (const char *b64, unsigned int len)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load the exponent. <a href="#z169_1"></a><br></td></tr>
</table>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="w3" doxytag="XSECCryptoKeyRSA::PaddingType"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">enum <a class="el" href="classXSECCryptoKeyRSA.html#w3">XSECCryptoKeyRSA::PaddingType</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Padding type.
<p>
Type of padding to be used for RSA encrypt/decrypt operations <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="w3w0" doxytag="PAD_NONE"></a>PAD_NONE</em> </td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="w3w1" doxytag="PAD_PKCS_1_5"></a>PAD_PKCS_1_5</em> </td><td>
No padding (Illegal for all enc ops) </td></tr>
<tr><td valign="top"><em><a class="anchor" name="w3w2" doxytag="PAD_OAEP_MGFP1"></a>PAD_OAEP_MGFP1</em> </td><td>
PKCS 1.5 padding </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="z166_0" doxytag="XSECCryptoKeyRSA::XSECCryptoKeyRSA"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">XSECCryptoKeyRSA::XSECCryptoKeyRSA </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="z166_1" doxytag="XSECCryptoKeyRSA::~XSECCryptoKeyRSA"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual XSECCryptoKeyRSA::~XSECCryptoKeyRSA </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z167_1" doxytag="XSECCryptoKeyRSA::clone"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual <a class="el" href="classXSECCryptoKey.html">XSECCryptoKey</a>* XSECCryptoKeyRSA::clone </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Replicate key.
<p>
<p>
Implements <a class="el" href="classXSECCryptoKey.html#z158_2">XSECCryptoKey</a>.
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z96_2">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z130_2">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z167_0" doxytag="XSECCryptoKeyRSA::getKeyType"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual <a class="el" href="classXSECCryptoKey.html#w9">XSECCryptoKey::KeyType</a> XSECCryptoKeyRSA::getKeyType </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Return the type of this key.
<p>
For RSA keys, this allows people to determine whether this is a public key, private key or a key pair
<p>
Reimplemented from <a class="el" href="classXSECCryptoKey.html#z158_0">XSECCryptoKey</a>.
<p>
Reimplemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z96_0">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z130_0">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_7" doxytag="XSECCryptoKeyRSA::getLength"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual unsigned int XSECCryptoKeyRSA::getLength </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Obtain the length of an RSA key.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The length of the rsa key (in bytes) </dd></dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_7">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_7">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_2" doxytag="XSECCryptoKeyRSA::getOAEPparams"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual const unsigned char* XSECCryptoKeyRSA::getOAEPparams </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Get the OAEPparams.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>a pointer to the (crypto object owned) buffer holding the OAEPparams or NULL if no params are held </dd></dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_2">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_2">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_1" doxytag="XSECCryptoKeyRSA::getOAEPparamsLen"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual unsigned int XSECCryptoKeyRSA::getOAEPparamsLen </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Get OAEPparams Length.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the number of bytes of the OAEPparams buffer (assuming it has been set) </dd></dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_1">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_1">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z169_1" doxytag="XSECCryptoKeyRSA::loadPublicExponentBase64BigNums"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void XSECCryptoKeyRSA::loadPublicExponentBase64BigNums </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>b64</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>len</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Load the exponent.
<p>
Load the exponent from a Base64 encoded string<p>
param b64 A buffer containing the encoded string param len The length of the data in the buffer
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z98_1">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z132_1">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z169_0" doxytag="XSECCryptoKeyRSA::loadPublicModulusBase64BigNums"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void XSECCryptoKeyRSA::loadPublicModulusBase64BigNums </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>b64</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>len</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Load the modulus.
<p>
Load the modulus from a Base64 encoded string<p>
param b64 A buffer containing the encoded string param len The length of the data in the buffer
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z98_0">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z132_0">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_5" doxytag="XSECCryptoKeyRSA::privateDecrypt"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual unsigned int XSECCryptoKeyRSA::privateDecrypt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const unsigned char * </td>
<td class="mdname" nowrap> <em>inBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>plainBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>inLength</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>maxOutLength</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="classXSECCryptoKeyRSA.html#w3">PaddingType</a> </td>
<td class="mdname" nowrap> <em>padding</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="DSIGConstants_8hpp.html#a104">hashMethod</a> </td>
<td class="mdname" nowrap> <em>hm</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Decrypt using private key.
<p>
The library will call this function to decrypt a piece of cipher text using the private component of this key.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>inBuf</em> </td><td>cipher text to decrypt </td></tr>
<tr><td valign="top"></td><td valign="top"><em>plainBuf</em> </td><td>output buffer for decrypted bytes </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inLength</em> </td><td>bytes of cipher text to decrypt </td></tr>
<tr><td valign="top"></td><td valign="top"><em>maxOutLength</em> </td><td>size of outputBuffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>padding</em> </td><td>Type of padding (PKCS 1.5 or OAEP) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hm</em> </td><td>Hash Method for OAEP encryption (OAEPParams should be set using <a class="el" href="classXSECCryptoKeyRSA.html#z168_0">setOAEPparams()</a> </td></tr>
</table>
</dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_5">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_5">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_6" doxytag="XSECCryptoKeyRSA::publicEncrypt"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual unsigned int XSECCryptoKeyRSA::publicEncrypt </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const unsigned char * </td>
<td class="mdname" nowrap> <em>inBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>cipherBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>inLength</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>maxOutLength</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="classXSECCryptoKeyRSA.html#w3">PaddingType</a> </td>
<td class="mdname" nowrap> <em>padding</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="DSIGConstants_8hpp.html#a104">hashMethod</a> </td>
<td class="mdname" nowrap> <em>hm</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Encrypt using a public key.
<p>
The library will call this function to encrypt a plain text buffer using the public component of this key.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>inBuf</em> </td><td>plain text to decrypt </td></tr>
<tr><td valign="top"></td><td valign="top"><em>cipherBuf</em> </td><td>output buffer for decrypted bytes </td></tr>
<tr><td valign="top"></td><td valign="top"><em>inLength</em> </td><td>bytes of plain text to encrypt </td></tr>
<tr><td valign="top"></td><td valign="top"><em>maxOutLength</em> </td><td>size of outputBuffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>padding</em> </td><td>Type of padding (PKCS 1.5 or OAEP) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hm</em> </td><td>Hash Method for OAEP encryption </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hm</em> </td><td>Hash Method for OAEP encryption (OAEPParams should be set using <a class="el" href="classXSECCryptoKeyRSA.html#z168_0">setOAEPparams()</a> </td></tr>
</table>
</dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_6">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_6">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_0" doxytag="XSECCryptoKeyRSA::setOAEPparams"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual void XSECCryptoKeyRSA::setOAEPparams </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">unsigned char * </td>
<td class="mdname" nowrap> <em>params</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>paramsLen</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Set the OAEPparams string.
<p>
By default, the library expects crypto implementations to perform OAEP padding with no params. This call allows the library (or user) to set a params value prior to an encrypt/decrypt operation.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>params</em> </td><td>buffer containing the params data. Pass in NULL to clear any old paramters. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>paramsLen</em> </td><td>number of bytes in buffer to use. Pass in 0 to clear any old parameters. </td></tr>
</table>
</dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_0">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_0">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_4" doxytag="XSECCryptoKeyRSA::signSHA1PKCS1Base64Signature"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual unsigned int XSECCryptoKeyRSA::signSHA1PKCS1Base64Signature </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">unsigned char * </td>
<td class="mdname" nowrap> <em>hashBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>hashLen</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>char * </td>
<td class="mdname" nowrap> <em>base64SignatureBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>base64SignatureBufLen</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Create a signature.
<p>
The library will call this function to create a signature from a pre-calculated digest. The output signature is required to be Base64 encoded such that it can be placed directly into the XML document<p>
This call needs to do a PKCS1 encode for a SHA-1 signature.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>hashBuf</em> </td><td>Buffer containing the pre-calculated (binary) digest </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hashLen</em> </td><td>Number of bytes of hash in the hashBuf </td></tr>
<tr><td valign="top"></td><td valign="top"><em>base64SignatureBuf</em> </td><td>Buffer to place the base64 encoded result in. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>base64SignatureBufLen</em> </td><td>Implementations need to ensure they do not write more bytes than this into the buffer </td></tr>
</table>
</dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_4">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_4">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<a class="anchor" name="z168_3" doxytag="XSECCryptoKeyRSA::verifySHA1PKCS1Base64Signature"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">virtual bool XSECCryptoKeyRSA::verifySHA1PKCS1Base64Signature </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const unsigned char * </td>
<td class="mdname" nowrap> <em>hashBuf</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>hashLen</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>base64Signature</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>sigLen</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Verify a SHA1 PKCS1 encoded signature.
<p>
The library will call this function to validate an RSA signature The standard by default uses SHA1 in a PKCS1 encoding.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>hashBuf</em> </td><td>Buffer containing the pre-calculated (binary) digest </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hashLen</em> </td><td>Length of the data in the digest buffer </td></tr>
<tr><td valign="top"></td><td valign="top"><em>base64Signature</em> </td><td>Buffer containing the Base64 encoded signature </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sigLen</em> </td><td>Length of the data in the signature buffer </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if the signature was valid, false otherwise </dd></dl>
<p>
Implemented in <a class="el" href="classOpenSSLCryptoKeyRSA.html#z97_3">OpenSSLCryptoKeyRSA</a>, and <a class="el" href="classWinCAPICryptoKeyRSA.html#z131_3">WinCAPICryptoKeyRSA</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="XSECCryptoKeyRSA_8hpp-source.html">XSECCryptoKeyRSA.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Sun Jul 3 17:45:31 2005 for XML-Security-C by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>
|