Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5077 from EOSIO/update_crypto_h
Browse files Browse the repository at this point in the history
update crypto.h to use const char*
  • Loading branch information
larryk85 authored Aug 7, 2018
2 parents 4d5e663 + 1e06d39 commit 62420d2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions contracts/eosiolib/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C" {
* eosio::print("sha256 hash generated from data equals provided hash");
* @endcode
*/
void assert_sha256( char* data, uint32_t length, const checksum256* hash );
void assert_sha256( const char* data, uint32_t length, const checksum256* hash );

/**
* Tests if the sha1 hash generated from data matches the provided checksum.
Expand All @@ -67,7 +67,7 @@ void assert_sha256( char* data, uint32_t length, const checksum256* hash );
* eosio::print("sha1 hash generated from data equals provided hash");
* @endcode
*/
void assert_sha1( char* data, uint32_t length, const checksum160* hash );
void assert_sha1( const char* data, uint32_t length, const checksum160* hash );

/**
* Tests if the sha512 hash generated from data matches the provided checksum.
Expand All @@ -92,7 +92,7 @@ void assert_sha1( char* data, uint32_t length, const checksum160* hash );
* eosio::print("sha512 hash generated from data equals provided hash");
* @endcode
*/
void assert_sha512( char* data, uint32_t length, const checksum512* hash );
void assert_sha512( const char* data, uint32_t length, const checksum512* hash );

/**
* Tests if the ripemod160 hash generated from data matches the provided checksum.
Expand All @@ -116,7 +116,7 @@ void assert_sha512( char* data, uint32_t length, const checksum512* hash );
* eosio::print("ripemod160 hash generated from data equals provided hash");
* @endcode
*/
void assert_ripemd160( char* data, uint32_t length, const checksum160* hash );
void assert_ripemd160( const char* data, uint32_t length, const checksum160* hash );

/**
* Hashes `data` using `sha256` and stores result in memory pointed to by hash.
Expand All @@ -134,7 +134,7 @@ void assert_ripemd160( char* data, uint32_t length, const checksum160* hash );
* eos_assert( calc_hash == hash, "invalid hash" );
* @endcode
*/
void sha256( char* data, uint32_t length, checksum256* hash );
void sha256( const char* data, uint32_t length, checksum256* hash );

/**
* Hashes `data` using `sha1` and stores result in memory pointed to by hash.
Expand All @@ -152,7 +152,7 @@ void sha256( char* data, uint32_t length, checksum256* hash );
* eos_assert( calc_hash == hash, "invalid hash" );
* @endcode
*/
void sha1( char* data, uint32_t length, checksum160* hash );
void sha1( const char* data, uint32_t length, checksum160* hash );

/**
* Hashes `data` using `sha512` and stores result in memory pointed to by hash.
Expand All @@ -170,7 +170,7 @@ void sha1( char* data, uint32_t length, checksum160* hash );
* eos_assert( calc_hash == hash, "invalid hash" );
* @endcode
*/
void sha512( char* data, uint32_t length, checksum512* hash );
void sha512( const char* data, uint32_t length, checksum512* hash );

/**
* Hashes `data` using `ripemod160` and stores result in memory pointed to by hash.
Expand All @@ -188,7 +188,7 @@ void sha512( char* data, uint32_t length, checksum512* hash );
* eos_assert( calc_hash == hash, "invalid hash" );
* @endcode
*/
void ripemd160( char* data, uint32_t length, checksum160* hash );
void ripemd160( const char* data, uint32_t length, checksum160* hash );

/**
* Calculates the public key used for a given signature and hash used to create a message.
Expand Down

0 comments on commit 62420d2

Please sign in to comment.