ipv4.pad0 = 0;
uint8_t hash[20];
- if (ComputeSHA1((const uint8_t *)&ipv4, sizeof(ipv4), hash, sizeof(hash)) == 1) {
+ if (SCSha1HashBuffer((const uint8_t *)&ipv4, sizeof(ipv4), hash, sizeof(hash)) == 1) {
strlcpy((char *)base64buf, "1:", COMMUNITY_ID_BUF_SIZE);
unsigned long out_len = COMMUNITY_ID_BUF_SIZE - 2;
if (Base64Encode(hash, sizeof(hash), base64buf+2, &out_len) == SC_BASE64_OK) {
ipv6.pad0 = 0;
uint8_t hash[20];
- if (ComputeSHA1((const uint8_t *)&ipv6, sizeof(ipv6), hash, sizeof(hash)) == 1) {
+ if (SCSha1HashBuffer((const uint8_t *)&ipv6, sizeof(ipv6), hash, sizeof(hash)) == 1) {
strlcpy((char *)base64buf, "1:", COMMUNITY_ID_BUF_SIZE);
unsigned long out_len = COMMUNITY_ID_BUF_SIZE - 2;
if (Base64Encode(hash, sizeof(hash), base64buf+2, &out_len) == SC_BASE64_OK) {