PublicKeyInfo.php 888 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * PublicKeyInfo
  4. *
  5. * PHP version 5
  6. *
  7. * @category File
  8. * @package ASN1
  9. * @author Jim Wigginton <terrafrost@php.net>
  10. * @copyright 2016 Jim Wigginton
  11. * @license http://www.opensource.org/licenses/mit-license.html MIT License
  12. * @link http://phpseclib.sourceforge.net
  13. */
  14. namespace phpseclib\File\ASN1\Maps;
  15. use phpseclib\File\ASN1;
  16. /**
  17. * PublicKeyInfo
  18. *
  19. * this format is not formally defined anywhere but is none-the-less the form you
  20. * get when you do "openssl rsa -in private.pem -outform PEM -pubout"
  21. *
  22. * @package ASN1
  23. * @author Jim Wigginton <terrafrost@php.net>
  24. * @access public
  25. */
  26. abstract class PublicKeyInfo
  27. {
  28. const MAP = [
  29. 'type' => ASN1::TYPE_SEQUENCE,
  30. 'children' => [
  31. 'publicKeyAlgorithm'=> AlgorithmIdentifier::MAP,
  32. 'publicKey' => ['type' => ASN1::TYPE_BIT_STRING]
  33. ]
  34. ];
  35. }