crypto: Add crypto_cipher_tk_bits

This commit is contained in:
Denis Kenzior 2014-12-26 12:15:46 -06:00
parent 07c8876d9e
commit f647e03166
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,11 @@ int crypto_cipher_key_len(enum crypto_cipher cipher)
return 0;
}
int crypto_cipher_tk_bits(enum crypto_cipher cipher)
{
return crypto_cipher_key_len(cipher) * 8;
}
int crypto_psk_from_passphrase(const char *passphrase,
const unsigned char *ssid, size_t ssid_len,
unsigned char *out_psk)

View File

@ -32,6 +32,7 @@ enum crypto_cipher {
};
int crypto_cipher_key_len(enum crypto_cipher cipher);
int crypto_cipher_tk_bits(enum crypto_cipher cipher);
int crypto_psk_from_passphrase(const char *passphrase,
const unsigned char *ssid, size_t ssid_len,