gg-crypto-ucryptolib.c
int crypto_set_hmac_key(GG_crypt *ggc, const void *key, size_t key_len) {
  if (key_len > HMAC_KEY_MAX_LEN) {
    REPORT_ERROR("KEY too large");
    return -1;
  }
  memcpy(ggc->hmac_key.key, key, key_len);
  ggc->hmac_key.len = key_len;

  if (!crypto_hmac_init(ggc))
    return 0;
  else
    return 1;
}
/* returns -1 on failure, 0 on success */
1 on failure, 0 on success
1 on failure 0 on success
int crypto_set_hmac_key(GG_crypt *ggc, const void *key, size_t key_len) {
  if (key_len > HMAC_KEY_MAX_LEN) {
    REPORT_ERROR("KEY too large");
    return -1;
  }
  memcpy(ggc->hmac_key.key, key, key_len);
  ggc->hmac_key.len = key_len;
  if (!crypto_hmac_init(ggc))
    return 0;
  else
    return 1;
}
int crypto_set_hmac_key ( GG_crypt * ggc , const void * key , size_t key_len ) { if ( key_len > HMAC_KEY_MAX_LEN ) { REPORT_ERROR ( " " ) ; return -1 ; } memcpy ( ggc -> hmac_key . key , key , key_len ) ; ggc -> hmac_key . len = key_len ; if ( ! crypto_hmac_init ( ggc ) ) return 0 ; else return 1 ; }
returns -1 on failure, 0 on success
returns - 1 on failure 0 on success