Implement |DES_ede2_cbc_encrypt|.
Change-Id: I0d2a09242e2d5092ee7facab4729e9af36d9d548 Reviewed-on: https://boringssl-review.googlesource.com/4752 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
a7997f12be
commit
dc8c739a3b
@ -762,3 +762,11 @@ void DES_ede3_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
|
||||
|
||||
tin[0] = tin[1] = 0;
|
||||
}
|
||||
|
||||
void DES_ede2_cbc_encrypt(const uint8_t *in, uint8_t *out, size_t len,
|
||||
const DES_key_schedule *ks1,
|
||||
const DES_key_schedule *ks2,
|
||||
DES_cblock *ivec,
|
||||
int enc) {
|
||||
DES_ede3_cbc_encrypt(in, out, len, ks1, ks2, ks1, ivec, enc);
|
||||
}
|
||||
|
@ -131,6 +131,16 @@ OPENSSL_EXPORT void DES_ede3_cbc_encrypt(const uint8_t *in, uint8_t *out,
|
||||
const DES_key_schedule *ks3,
|
||||
DES_cblock *ivec, int enc);
|
||||
|
||||
/* DES_ede2_cbc_encrypt encrypts (or decrypts, if |enc| is |DES_DECRYPT|) |len|
|
||||
* bytes from |in| to |out| with 3DES in CBC mode. With this keying option, the
|
||||
* first and third 3DES keys are identical. Thus, this function takes only two
|
||||
* different |DES_key_schedule|s. */
|
||||
OPENSSL_EXPORT void DES_ede2_cbc_encrypt(const uint8_t *in, uint8_t *out,
|
||||
size_t len,
|
||||
const DES_key_schedule *ks1,
|
||||
const DES_key_schedule *ks2,
|
||||
DES_cblock *ivec, int enc);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
|
Loading…
Reference in New Issue
Block a user