equal
deleted
inserted
replaced
450 public final Provider getProvider() { |
450 public final Provider getProvider() { |
451 chooseFirstProvider(); |
451 chooseFirstProvider(); |
452 return this.provider; |
452 return this.provider; |
453 } |
453 } |
454 |
454 |
|
455 private String getProviderName() { |
|
456 return (provider == null) ? "(no provider)" : provider.getName(); |
|
457 } |
|
458 |
455 void chooseFirstProvider() { |
459 void chooseFirstProvider() { |
456 // empty, overridden in Delegate |
460 // empty, overridden in Delegate |
457 } |
461 } |
458 |
462 |
459 /** |
463 /** |
471 engineInitVerify(publicKey); |
475 engineInitVerify(publicKey); |
472 state = VERIFY; |
476 state = VERIFY; |
473 |
477 |
474 if (!skipDebug && pdebug != null) { |
478 if (!skipDebug && pdebug != null) { |
475 pdebug.println("Signature." + algorithm + |
479 pdebug.println("Signature." + algorithm + |
476 " verification algorithm from: " + this.provider.getName()); |
480 " verification algorithm from: " + getProviderName()); |
477 } |
481 } |
478 } |
482 } |
479 |
483 |
480 /** |
484 /** |
481 * Initializes this object for verification, using the public key from |
485 * Initializes this object for verification, using the public key from |
520 engineInitVerify(publicKey); |
524 engineInitVerify(publicKey); |
521 state = VERIFY; |
525 state = VERIFY; |
522 |
526 |
523 if (!skipDebug && pdebug != null) { |
527 if (!skipDebug && pdebug != null) { |
524 pdebug.println("Signature." + algorithm + |
528 pdebug.println("Signature." + algorithm + |
525 " verification algorithm from: " + this.provider.getName()); |
529 " verification algorithm from: " + getProviderName()); |
526 } |
530 } |
527 } |
531 } |
528 |
532 |
529 /** |
533 /** |
530 * Initialize this object for signing. If this method is called |
534 * Initialize this object for signing. If this method is called |
541 engineInitSign(privateKey); |
545 engineInitSign(privateKey); |
542 state = SIGN; |
546 state = SIGN; |
543 |
547 |
544 if (!skipDebug && pdebug != null) { |
548 if (!skipDebug && pdebug != null) { |
545 pdebug.println("Signature." + algorithm + |
549 pdebug.println("Signature." + algorithm + |
546 " signing algorithm from: " + this.provider.getName()); |
550 " signing algorithm from: " + getProviderName()); |
547 } |
551 } |
548 } |
552 } |
549 |
553 |
550 /** |
554 /** |
551 * Initialize this object for signing. If this method is called |
555 * Initialize this object for signing. If this method is called |
564 engineInitSign(privateKey, random); |
568 engineInitSign(privateKey, random); |
565 state = SIGN; |
569 state = SIGN; |
566 |
570 |
567 if (!skipDebug && pdebug != null) { |
571 if (!skipDebug && pdebug != null) { |
568 pdebug.println("Signature." + algorithm + |
572 pdebug.println("Signature." + algorithm + |
569 " signing algorithm from: " + this.provider.getName()); |
573 " signing algorithm from: " + getProviderName()); |
570 } |
574 } |
571 } |
575 } |
572 |
576 |
573 /** |
577 /** |
574 * Returns the signature bytes of all the data updated. |
578 * Returns the signature bytes of all the data updated. |