ARCHIVE_WRITE_SET_PASSPHRASE(3)

πŸ“¦
version 3.8.11 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ARCHIVE_WRITE_SET_PASSPHRASE(3) πŸ’–

okay bestie, welcome to the archive_write_set_passphrase page from libarchive β€” the section 3 joint that's all about writing encrypted archives. πŸŽ€ this is the streaming archive library, and yes we're linking it with -larchive like the icons we are.


🌸 LIBRARY 🌸

Streaming Archive Library (libarchive, -larchive). it's giving ✨ trusted friend energy ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <archive.h>

int
archive_write_set_passphrase(struct archive *, const char *passphrase);

int
archive_write_set_passphrase_callback(struct archive *,
    void *client_data, archive_passphrase_callback *);

copy that exactly, no cap. 🫢


πŸ’… DESCRIPTION πŸ’…

🌈 archive_write_set_passphrase()

bestie this one sets a passphrase for writing an encrypted archive. periodt. πŸ”

but listen β€” if passphrase is NULL or empty, this function will do nothing and return ARCHIVE_FAILED. 😭 not the empty-string betrayal. otherwise, it returns ARCHIVE_OK and we're slaying. πŸ’–

πŸ“ archive_write_set_passphrase_callback()

this one registers a callback function that gets invoked to grab a passphrase for encryption if the passphrase wasn't already set by the archive_write_set_passphrase() function. so it's the backup bestie. the understudy. the main character who steps in when nobody set a passphrase. πŸ‘‘


⭐ SEE ALSO ⭐

go read those too, iykyk πŸ’œ


that's the whole page, bestie β€” every flag, every return value, every reference, untouched, just blessed with vibes. πŸ’…βœ¨

mwah πŸ’‹ this was the Debian build, dated September 21, 201… yes the year is literally cut off in the source, not my fault, not me fixing it πŸ™ˆ, and the whole thing lives under the ARCHIVE_WRITE_SET_PASSPHRASE(3) banner. bye pookie, go encrypt something πŸ¦‹πŸŒˆπŸ’–

πŸ“¦ where this page comes from