Hash.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @file Hash.h
  3. * @date 20.05.2015
  4. * @author Markus Sattler
  5. *
  6. * Copyright (c) 2015 Markus Sattler. All rights reserved.
  7. * This file is part of the esp8266 core for Arduino environment.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2.1 of the License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. */
  24. #ifndef HASH_H_
  25. #define HASH_H_
  26. //#define DEBUG_SHA1
  27. void sha1(const uint8_t* data, uint32_t size, uint8_t hash[20]);
  28. void sha1(const char* data, uint32_t size, uint8_t hash[20]);
  29. void sha1(const String& data, uint8_t hash[20]);
  30. String sha1(const uint8_t* data, uint32_t size);
  31. String sha1(const char* data, uint32_t size);
  32. String sha1(const String& data);
  33. #endif /* HASH_H_ */