Android-cuttlefish cvd tool
Macros | Functions
android_pubkey.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <openssl/rsa.h>
Include dependency graph for android_pubkey.h:

Go to the source code of this file.

Macros

#define ANDROID_PUBKEY_MODULUS_SIZE   (2048 / 8)
 
#define ANDROID_PUBKEY_ENCODED_SIZE    (3 * sizeof(uint32_t) + 2 * ANDROID_PUBKEY_MODULUS_SIZE)
 

Functions

bool android_pubkey_decode (const uint8_t *key_buffer, size_t size, RSA **key)
 
bool android_pubkey_encode (const RSA *key, uint8_t *key_buffer, size_t size)
 

Macro Definition Documentation

◆ ANDROID_PUBKEY_ENCODED_SIZE

#define ANDROID_PUBKEY_ENCODED_SIZE    (3 * sizeof(uint32_t) + 2 * ANDROID_PUBKEY_MODULUS_SIZE)

◆ ANDROID_PUBKEY_MODULUS_SIZE

#define ANDROID_PUBKEY_MODULUS_SIZE   (2048 / 8)

Function Documentation

◆ android_pubkey_decode()

bool android_pubkey_decode ( const uint8_t *  key_buffer,
size_t  size,
RSA **  key 
)

◆ android_pubkey_encode()

bool android_pubkey_encode ( const RSA *  key,
uint8_t *  key_buffer,
size_t  size 
)