upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/nip04.h
blob: f612a8e52f59955aead3e4a77f7bc55e453796d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef NIP04_H
#define NIP04_H

#include <stdint.h>
#include <stddef.h>

void nip04_encrypt(const uint8_t *sender_privkey, const uint8_t *recipient_pubkey,
                   const char *plaintext, uint8_t *ciphertext_base64, size_t *out_len);

int nip04_decrypt(const uint8_t *recipient_privkey, const uint8_t *sender_pubkey,
                  const char *ciphertext_base64, char *plaintext, size_t plaintext_max);

#endif