diff options
author | Simo Sorce <simo@redhat.com> | 2013-12-14 16:55:40 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-12-15 21:10:20 -0500 |
commit | e8df9073aa324482213b878565d3da89a0e191ed (patch) | |
tree | b45b0e7cfce6935acdd00a2575417b787d03fa21 /src/crypto.h | |
parent | ed9b71eedad9a5405edc21646576b03526f7fb0c (diff) | |
download | gss-ntlmssp-e8df9073aa324482213b878565d3da89a0e191ed.tar.gz gss-ntlmssp-e8df9073aa324482213b878565d3da89a0e191ed.tar.xz gss-ntlmssp-e8df9073aa324482213b878565d3da89a0e191ed.zip |
Add import/export functions for the RC4 state
Diffstat (limited to 'src/crypto.h')
-rw-r--r-- | src/crypto.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/crypto.h b/src/crypto.h index 87ff830..e40852e 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -113,6 +113,26 @@ int RC4_UPDATE(struct ntlm_rc4_handle *handle, void RC4_FREE(struct ntlm_rc4_handle **handle); /** + * @brief Exports the RC4 state + * + * @param handle The RC4 handle to export from + * @param out A buffer at least 258 bytes long + * + * @return 0 on success or EAGAIN if the buffer is too small + */ +int RC4_EXPORT(struct ntlm_rc4_handle *handle, struct ntlm_buffer *out); + +/** + * @brief Import an RC4 state + * + * @param handle A new ntlm_rc4_handle on success + * @param in A buffer containing an exported state + * + * @return 0 on success or EINVAL if the buffer is not an exported state + */ +int RC4_IMPORT(struct ntlm_rc4_handle **handle, struct ntlm_buffer *in); + +/** * @brief RC4 encryption/decryption all in one * * @param key The encryption/decryption key |