gsasl_sha1(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

πŸ’… gsasl_sha1(3) β€” the gsasl manual, bestie edition ✨

okay so you found your way to the gsasl manual, section 3, and specifically the gsasl_sha1 page. slay. this is an API function, and it's giving "small but mighty" energy. let's get into it 🫢


🌸 NAME 🌸

gsasl_sha1 β€” an API function. that's it, that's the whole vibe. short, iconic, to the point πŸ‘‘


✨ SYNOPSIS ✨

#include <gsasl.h>

int gsasl_sha1(const char * in, size_t inlen, char * [] out);

there she is. look at her. so simple. so clean. write it down exactly like that, no cap πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * in β€” the input character array, aka the data you wanna hash. hand it over bestie πŸ“
  • size_t inlen β€” the length of that input character array. how many bytes of data to hash, fr fr.
  • char * [] out β€” a newly allocated 20-byte character array holding the hash of the data. freshly allocated, just for you, like a little gift 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

compute the hash of your data using SHA1. that's the whole job. she does one thing and she does it well πŸ’…

the out buffer must be deallocated by the caller β€” yes, you. that's your responsibility, bestie. it's not gonna clean up after itself, no matter how much you want it to 😭

Return value: returns GSASL_OK iff successful. that's it. GSASL_OK or bust. anything else means it did not go okay, and you should be paying attention πŸ‘€


🌈 SINCE 🌈

1.3 β€” so she's been around a minute. seasoned. experienced. main character energy from day one ✨


πŸ’€ DEPRECATED πŸ’€

Use a crypto library.

that's the whole note. not me being the bearer of bad news 😭 she's deprecated, so maybe don't build your whole personality around her in new code. use a crypto library instead. periodt πŸ’…


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? first of all, valid. second of all, report it to:

  • <bug-gsasl@gnu.org>

general guidelines for reporting bugs live over at:

and the GNU SASL home page is right here:

go forth and file responsibly 🫢


Copyright Β© 2002-2021 Simon Josefsson.

copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. yes, for real, for free, no strings. we love a permissive moment 🌸


⭐ SEE ALSO ⭐

the full documentation for gsasl is maintained as a Texinfo manual. if the info and gsasl programs are properly installed at your site, this command:

info gsasl

should give you access to the complete manual. (should! assuming your site is set up right, iykyk 🧚)

as an alternative, you may obtain the manual from:

http://www.gnu.org/software/gsasl/manual/

so yeah. that's gsasl_sha1. short page, big responsibility, deprecated queen. hash your data, free your buffer, and please, please use a crypto library for new stuff πŸ’œ

that's a wrap on this page, babes πŸ’– this came to you from the gsasl manual, version 1.10.0, page gsasl_sha1(3). go slay your hashes responsibly βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from