mirror of https://github.com/dirtbags/moth.git
22 lines
612 B
C
22 lines
612 B
C
#ifndef __TOKEN_H__
|
|
#define __TOKEN_H__
|
|
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
|
|
/* ARC4 functions, in case anybody wants 'em */
|
|
struct arc4_ctx;
|
|
void arc4_init(struct arc4_ctx *ctx,
|
|
uint8_t const *key, size_t keylen);
|
|
void arc4_crypt(struct arc4_ctx *ctx,
|
|
uint8_t *obuf, uint8_t const *ibuf, size_t buflen);
|
|
void arc4_crypt_buffer(uint8_t const *key, size_t keylen,
|
|
uint8_t *buf, size_t buflen);
|
|
|
|
ssize_t read_token(char *name,
|
|
uint8_t const *key, size_t keylen,
|
|
char *buf, size_t buflen);
|
|
|
|
#endif
|