| 834 | } |
| 835 | |
| 836 | static inline int |
| 837 | sctp_get_hmac_block_len(uint16_t hmac_algo) |
| 838 | { |
| 839 | switch (hmac_algo) { |
| 840 | case SCTP_AUTH_HMAC_ID_SHA1: |
| 841 | return (64); |
| 842 | case SCTP_AUTH_HMAC_ID_SHA256: |
| 843 | return (64); |
| 844 | case SCTP_AUTH_HMAC_ID_RSVD: |
| 845 | default: |
| 846 | /* unknown HMAC algorithm: can't do anything */ |
| 847 | return (0); |
| 848 | } /* end switch */ |
| 849 | } |
| 850 | |
| 851 | static void |
| 852 | sctp_hmac_init(uint16_t hmac_algo, sctp_hash_context_t *ctx) |
no outgoing calls
no test coverage detected