That's a copy-pasted variation of this public-domain SHA1 code:
http://ftp.funet.fi/pub/crypt/hash/sha/sha1.c surrounded by base64 decoding and encoding for a known-length binary text.
By inlining all library code you use, yes indeed, you too can also not make a single call.