skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 3:... HP Open Source Security for OpenVMS Volume 3:...
go to beginning of chapter: KRB5 (Kerberos V5) Application Programming Interface KRB5 (Kerberos V5) Application Programming Interface
go to previous page: krb5_c_decrypt  Decrypt encrypted data krb5_c_decrypt Decrypt encrypted data
go to next page: krb5_c_encrypt_length  Get the length of encrypted datakrb5_c_encrypt_length Get the length of encrypted data
end of book navigation links

krb5_c_encrypt -- Encrypt data 



C Prototype 

krb5_error_code krb5_c_encrypt (
        krb5_context            context,
        const krb5_keyblock     *key,
        krb5_keyusage           usage,
        const krb5_data         *ivec,
        const krb5_data         *input,
        krb5_enc_data           *output );

Arguments 

context
(input/output)
 The context structure.
key (input)  The key value from a keytab, ticket, etc.
usage (input) A salt value.
ivec (input) Input vector.
input (input) The data to be encrypted.
output (output) The encrypted data.

Description 

This routine encrypts data with the given key.

Return Values 

This routine returns the following KRB5 status code:

KRB5_BAD_ENCTYPE
Bad encryption type.


go to previous page: krb5_c_decrypt  Decrypt encrypted data krb5_c_decrypt Decrypt encrypted data
go to next page: krb5_c_encrypt_length  Get the length of encrypted datakrb5_c_encrypt_length Get the length of encrypted data