lib:crypto: Use bytearray macros
authorAndreas Schneider <asn@samba.org>
Thu, 30 Nov 2023 07:32:45 +0000 (08:32 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Nov 2023 20:23:34 +0000 (20:23 +0000)
Do not use old macros which are not descriptive by the name.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
lib/crypto/gnutls_sp800_108.c

index dc04354d3d226922fa783ecb024726fc2f628ae6..65710657bae22547744e9ba670f0e585c051efc3 100644 (file)
@@ -41,7 +41,7 @@ static NTSTATUS samba_gnutls_sp800_108_derive_key_part(
        static const uint8_t zero = 0;
        int rc;
 
-       RSIVAL(buf, 0, i);
+       PUSH_BE_U32(buf, 0, i);
        rc = gnutls_hmac(hmac_hnd, buf, sizeof(buf));
        if (rc < 0) {
                return gnutls_error_to_ntstatus(rc,
@@ -69,7 +69,7 @@ static NTSTATUS samba_gnutls_sp800_108_derive_key_part(
                        return gnutls_error_to_ntstatus(
                                rc, NT_STATUS_HMAC_NOT_SUPPORTED);
                }
-               RSIVAL(buf, 0, L);
+               PUSH_BE_U32(buf, 0, L);
                rc = gnutls_hmac(hmac_hnd, buf, sizeof(buf));
                if (rc < 0) {
                        return gnutls_error_to_ntstatus(