Plaster

common-lisp
size_t olm_pickle_account( OlmAccount * account, void const * key, size_t key_length, void * pickled, size_t pickled_length ); (defmethod pickle ((account account) (passphrase string)) "Store an Olm account. Stores an account as a base64 string. Encrypts the account using the supplied passphrase. Returns a byte object containing the base64 encoded string of the pickled account. Signals 'olm-account-error on failure." (let* ((p-length (%olm:pickle-account-length (account account))) (pass-bytes (ironclad:ascii-string-to-byte-array passphrase)) (pass-vec (static-vectors:make-static-vector (length passphrase) :initial-contents pass-bytes)) (p-buffer (make-string p-length))) (%olm:pickle-account (account account) (static-vectors:static-vector-pointer pass-vec) (length pass-bytes) p-buffer p-length) (check-error account) (dotimes (i (length pass-bytes)) (setf (aref pass-bytes i) #\Nul)) p-length))

Annotations