.. index:: pair: class; EE::System::SHA1 .. _doxid-class_e_e_1_1_system_1_1_s_h_a1: class EE::System::SHA1 ====================== .. toctree:: :hidden: struct_EE_System_SHA1_Context.rst struct_EE_System_SHA1_Result.rst Overview ~~~~~~~~ SHA-1 (FIPS 180-4) message digest. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class SHA1 { public: // typedefs typedef std::array<:ref:`Uint8`, 20> :target:`Digest`; // structs struct :ref:`Context`; struct :ref:`Result`; // methods static :ref:`Result` :ref:`fromStream`(:ref:`IOStream`& stream); static :ref:`Result` :ref:`fromFile`(std::string path); static :ref:`Result` :ref:`fromMemory`(const :ref:`Uint8`* data, :ref:`Uint64` size); static :ref:`Result` :ref:`fromString`(const std::string& str); static :ref:`Result` :ref:`fromString`(const :ref:`String`& str); static void :target:`init`(:ref:`Context`& ctx); static void :target:`update`(:ref:`Context`& ctx, const void* data, unsigned long size); static void :target:`final`(:ref:`Digest`& result, :ref:`Context`& ctx); static :ref:`Result` :target:`result`(:ref:`Context`& ctx); static std::string :target:`hexDigest`(const :ref:`Digest`& digest); }; .. _details-class_e_e_1_1_system_1_1_s_h_a1: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ SHA-1 (FIPS 180-4) message digest. SHA-1 is not collision resistant: use it for identifiers and interoperability (for example OpenSSH's C token or hashed known_hosts names), never for new security-sensitive designs. Methods ------- .. index:: pair: function; fromStream .. _doxid-class_e_e_1_1_system_1_1_s_h_a1_1abc4a40ec35684d564cc4c1f5bb46c7ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Result` fromStream(:ref:`IOStream`& stream) .. rubric:: Returns: Calculates the sha1 hash from a stream .. index:: pair: function; fromFile .. _doxid-class_e_e_1_1_system_1_1_s_h_a1_1a1b3fb32227b87fe5ba1263e72948bc89: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Result` fromFile(std::string path) Calculates the sha1 hash from a file .. index:: pair: function; fromMemory .. _doxid-class_e_e_1_1_system_1_1_s_h_a1_1a09b07dc7c588b1918b47a856d730a683: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Result` fromMemory(const :ref:`Uint8`* data, :ref:`Uint64` size) Calculates the sha1 hash from memory .. index:: pair: function; fromString .. _doxid-class_e_e_1_1_system_1_1_s_h_a1_1ac43b25f4b854da83952335291ca5225e: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Result` fromString(const std::string& str) Calculates the sha1 hash from a string .. index:: pair: function; fromString .. _doxid-class_e_e_1_1_system_1_1_s_h_a1_1ae66a2f912ec517f74042cb0d007d38d2: .. ref-code-block:: cpp :class: doxyrest-title-code-block static :ref:`Result` fromString(const :ref:`String`& str) Calculates the sha1 hash from a string