Sha256.php 600 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
  4. *
  5. * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
  6. */
  7. namespace Lcobucci\JWT\Signer\Hmac;
  8. use Lcobucci\JWT\Signer\Hmac;
  9. /**
  10. * Signer for HMAC SHA-256
  11. *
  12. * @author Luís Otávio Cobucci Oblonczyk <lcobucci@gmail.com>
  13. * @since 0.1.0
  14. */
  15. class Sha256 extends Hmac
  16. {
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function getAlgorithmId()
  21. {
  22. return 'HS256';
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function getAlgorithm()
  28. {
  29. return 'sha256';
  30. }
  31. }