-
- BlackBerry Dynamics
- Runtime library for iOS applications
- 12.0.1.79
Go to the documentation of this file.
17 # define GD_C_API __attribute__((visibility("default")))
89 struct GD_C_API GDCipherContext;
114 GD_C_API
const char*
GDCipher_name(
const struct GDCipherContext* ctx);
182 GD_C_API
int GDCipher_init(
struct GDCipherContext* ctx,
const struct GDCipher* cipher,
const void* key,
const void* iv,
int mode);
192 GD_C_API
int GDCipher_copy(
struct GDCipherContext* destination,
const struct GDCipherContext* source);
206 GD_C_API
int GDCipher_update(
struct GDCipherContext* ctx,
void* out_data,
int* out_data_sz,
const void* in_data,
int in_data_sz);
217 GD_C_API
int GDCipher_final(
struct GDCipherContext* ctx,
void* out_data,
int* out_sz);
229 GD_C_API
int GDCipher(
struct GDCipherContext* ctx,
void* out_data,
const void* in_data,
unsigned int in_data_sz);
258 struct GD_C_API GDDigestContext;
276 GD_C_API
const char*
GDDigest_name(
const struct GDDigestContext* ctx);
333 GD_C_API
int GDDigest_copy(
struct GDDigestContext* destination,
const struct GDDigestContext* source);
344 GD_C_API
int GDDigest_update(
struct GDDigestContext* ctx,
const void* message,
size_t message_sz);
356 GD_C_API
int GDDigest_final(
struct GDDigestContext* ctx,
void* digest,
unsigned int* digest_sz);
368 GD_C_API
int GDDigest(
const void* data,
size_t data_sz,
void* md,
unsigned int* md_sz,
const struct GDDigest* type);
379 GD_C_API
int GDDigest_sign_init(
struct GDDigestContext* ctx,
struct GDKeyContext** key_context,
const struct GDDigest* digest,
struct GDKey* key);
389 GD_C_API
int GDDigest_sign_final(
struct GDDigestContext* ctx,
void* signature,
size_t* signature_sz);
400 GD_C_API
int GDDigest_verify_init(
struct GDDigestContext* ctx,
struct GDKeyContext** key_ctx,
const struct GDDigest* digest,
struct GDKey* key);
411 GD_C_API
int GDDigest_verify_final(
struct GDDigestContext* ctx,
const void* signature,
size_t signature_sz);
int GDDigest_block_size(const struct GDDigest *digest)
Return the digest block size.
int GDDigest_verify_init(struct GDDigestContext *ctx, struct GDKeyContext **key_ctx, const struct GDDigest *digest, struct GDKey *key)
Initialize a digest context for verification.
unsigned long GDCipher_mode(const struct GDCipher *cipher)
Return the cipher mode.
const unsigned long GDCIPHER_OFB_MODE
OFB cipher mode.
int GDCipher_cleanup(struct GDCipherContext *ctx)
Clears all information from a cipher context.
int GDDigest_copy(struct GDDigestContext *destination, const struct GDDigestContext *source)
Copy a digest context.
void GDDigest_free(struct GDDigestContext *ctx)
Free the digest context.
int GDDigest_sign_init(struct GDDigestContext *ctx, struct GDKeyContext **key_context, const struct GDDigest *digest, struct GDKey *key)
Initialize a digest context for signing.
const unsigned long GDCIPHER_STREAM_CIPHER
Stream cipher mode.
int GDDigest_final(struct GDDigestContext *ctx, void *digest, unsigned int *digest_sz)
Finalize and output the digest.
int GDDigest_init(struct GDDigestContext *ctx, const struct GDDigest *algorithm)
Initialize a digest context.
int GDCipher_final(struct GDCipherContext *ctx, void *out_data, int *out_sz)
Encipher or decipher last block.
const unsigned long GDCIPHER_XTS_MODE
XTS cipher mode.
const struct GDDigest * GDDigest_byname(const char *name)
Return a digest algorithm by name.
const char * GDDigest_name(const struct GDDigestContext *ctx)
Return a digest's name.
const int GDCIPHER_MAX_BLOCK_LENGTH
Maximum block length for all ciphers.
const char * GDCipher_name(const struct GDCipherContext *ctx)
Return a cipher suite's name.
const unsigned long GDCIPHER_WRAP_MODE
Wrap cipher mode.
void GDCipher_set_padding(struct GDCipherContext *ctx, int padding)
Enable or disable padding.
const struct GDDigest * GDDigest_bycontext(const struct GDDigestContext *ctx)
Return a digest by context.
int GDDigest_size(const struct GDDigest *digest)
Size of a digest in bytes.
int GDDigest(const void *data, size_t data_sz, void *md, unsigned int *md_sz, const struct GDDigest *type)
Calculate a digest.
const struct GDCipher * GDCipher_byname(const char *name)
Return a cipher suite by name.
const unsigned long GDCIPHER_CCM_MODE
CCM cipher mode.
void GDCipher_free(struct GDCipherContext *ctx)
Free the cipher context.
const unsigned long GDCIPHER_CFB_MODE
CFB cipher mode.
struct GDCipherContext * GDCipher_new(void)
Return a new cipher context.
const struct GDCipher * GDCipher_bycontext(const struct GDCipherContext *ctx)
Return a cipher by context.
int GDCipher_block_size(const struct GDCipher *cipher)
Return the cipher block size.
int GDCipher_iv_length(const struct GDCipher *cipher)
Return the IV length.
const unsigned long GDCIPHER_GCM_MODE
GCM cipher mode.
const unsigned long GDCIPHER_CTR_MODE
CTR cipher mode.
const unsigned long GDCIPHER_ECB_MODE
ECB cipher mode.
int GDCipher_copy(struct GDCipherContext *destination, const struct GDCipherContext *source)
Copy a cipher context.
int GDDigest_sign_final(struct GDDigestContext *ctx, void *signature, size_t *signature_sz)
Sign a digest.
int GDDigest_update(struct GDDigestContext *ctx, const void *message, size_t message_sz)
Calculate a digest.
int GDDigest_verify_final(struct GDDigestContext *ctx, const void *signature, size_t signature_sz)
Verify a digest.
const int GDCIPHER_MAX_KEY_LENGTH
Maximum key length for all ciphers.
int GDCipher(struct GDCipherContext *ctx, void *out_data, const void *in_data, unsigned int in_data_sz)
Encipher or decipher.
int GDCipher_update(struct GDCipherContext *ctx, void *out_data, int *out_data_sz, const void *in_data, int in_data_sz)
Encipher or decipher.
const int GDDIGEST_MAX_SIZE
Maximum supported digest size in bytes.
int GDCipher_key_length(const struct GDCipher *cipher)
Return the cipher key length.
struct GDDigestContext * GDDigest_new(void)
Return a new digest context.
int GDDigest_cleanup(struct GDDigestContext *ctx)
Clears all information from a digest context.
const unsigned long GDCIPHER_CBC_MODE
CBC cipher mode.
int GDCipher_init(struct GDCipherContext *ctx, const struct GDCipher *cipher, const void *key, const void *iv, int mode)
Initialize a cipher context.
const char ** GDCipher_list(void)
Return all cipher suites by name.