23 #if defined (HAVE_CONFIG_H) 46 hash_fcn (
str.data (),
str.length (), result_buf);
48 std::ostringstream buf;
50 for (
int i = 0;
i < result_buf_len;
i++)
51 buf << std::hex << std::setw (2) << std::setfill (
'0')
52 << (result_buf[
i] & 0xFF);
123 else if (ht ==
"MD4")
125 else if (ht ==
"MD5")
127 else if (ht ==
"SHA1")
129 else if (ht ==
"SHA224")
131 else if (ht ==
"SHA256")
133 else if (ht ==
"SHA384")
135 else if (ht ==
"SHA512")
139 (
"hash function '%s' not supported",
hash_type.c_str ());
int octave_md4_digest_size(void)
std::string hash(hash_fptr hash_fcn, const std::string &str, int result_buf_len)
std::string sha512_hash(const std::string &str)
std::string md4_hash(const std::string &str)
int octave_sha224_digest_size(void)
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
void * octave_sha256_buffer_wrapper(const char *buf, size_t len, void *res)
int sha384_digest_size(void)
int octave_sha512_digest_size(void)
int octave_md5_digest_size(void)
int sha512_digest_size(void)
int sha224_digest_size(void)
void *() hash_fptr(const char *buffer, size_t len, void *res)
int md5_digest_size(void)
void * octave_sha512_buffer_wrapper(const char *buf, size_t len, void *res)
int md2_digest_size(void)
int md4_digest_size(void)
std::string md5_hash(const std::string &str)
OCTAVE_EXPORT octave_value_list Fhash(const octave_value_list &args, int) the SHA-1 hash value is calculated with nd group nd example nd deftypefn *std::string hash_type
void * octave_md4_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_sha224_buffer_wrapper(const char *buf, size_t len, void *res)
std::string md2_hash(const std::string &str)
int sha256_digest_size(void)
std::string sha1_hash(const std::string &str)
int octave_sha256_digest_size(void)
void * octave_sha1_buffer_wrapper(const char *buf, size_t len, void *res)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
ColumnVector transform(const Matrix &m, double x, double y, double z)
int octave_md2_digest_size(void)
int octave_sha1_digest_size(void)
std::string sha256_hash(const std::string &str)
std::string sha384_hash(const std::string &str)
void * octave_md5_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_sha384_buffer_wrapper(const char *buf, size_t len, void *res)
int octave_sha384_digest_size(void)
void * octave_md2_buffer_wrapper(const char *buf, size_t len, void *res)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
std::string sha224_hash(const std::string &str)
int sha1_digest_size(void)