Go to the source code of this file.
Defines | |
| #define | AST_KEY_PRIVATE (1 << 1) |
| #define | AST_KEY_PUBLIC (1 << 0) |
Variables | |
| int(*) | ast_check_signature (struct ast_key *key, const char *msg, const char *sig) |
| Check the authenticity of a message signature using a given public key. | |
| int(*) | ast_check_signature_bin (struct ast_key *key, const char *msg, int msglen, const unsigned char *sig) |
| Check the authenticity of a message signature using a given public key. | |
| int(*) | ast_decrypt_bin (unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key) |
| int(*) | ast_encrypt_bin (unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key) |
| ast_key *(*) | ast_key_get (const char *key, int type) |
| Retrieve a key. | |
| int(*) | ast_sign (struct ast_key *key, char *msg, char *sig) |
| int(*) | ast_sign_bin (struct ast_key *key, const char *msg, int msglen, unsigned char *sig) |
Definition in file crypto.h.
| int(*) ast_check_signature(struct ast_key *key, const char *msg, const char *sig) |
Check the authenticity of a message signature using a given public key.
| key | a public key to use to verify | |
| msg | the message that has been signed | |
| sig | the proposed valid signature in mime64-like encoding |
| int(*) ast_check_signature_bin(struct ast_key *key, const char *msg, int msglen, const unsigned char *sig) |
Check the authenticity of a message signature using a given public key.
| key | a public key to use to verify | |
| msg | the message that has been signed | |
| sig | the proposed valid signature in raw binary representation |
| int(*) ast_decrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key) |
| key | a private key to use to decrypt | |
| src | the message to decrypt | |
| srclen | the length of the message to decrypt | |
| dst | a pointer to a buffer of at least srclen bytes in which the decrypted answer will be stored |
| int(*) ast_encrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key) |
| key | a private key to use to encrypt | |
| src | the message to encrypt | |
| srclen | the length of the message to encrypt | |
| dst | a pointer to a buffer of at least srclen * 1.5 bytes in which the encrypted answer will be stored |
| struct ast_key*(*) ast_key_get(const char *key, int type) |
Retrieve a key.
| name | of the key we are retrieving | |
| int | type of key (AST_KEY_PUBLIC or AST_KEY_PRIVATE) |
| int(*) ast_sign(struct ast_key *key, char *msg, char *sig) |
| key | a private key to use to create the signature | |
| msg | the message to sign | |
| sig | a pointer to a buffer of at least 256 bytes in which the mime64-like encoded signature will be stored |
| int(*) ast_sign_bin(struct ast_key *key, const char *msg, int msglen, unsigned char *sig) |
| key | a private key to use to create the signature | |
| msg | the message to sign | |
| sig | a pointer to a buffer of at least 128 bytes in which the raw encoded signature will be stored |
1.5.1