~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to src/lib/misc/rfc3394/rfc3394.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* AES Key Wrap (RFC 3394)
 
3
* (C) 2011 Jack Lloyd
 
4
*
 
5
* Botan is released under the Simplified BSD License (see license.txt)
 
6
*/
 
7
 
 
8
#ifndef BOTAN_RFC3394_H_
 
9
#define BOTAN_RFC3394_H_
 
10
 
 
11
#include <botan/symkey.h>
 
12
 
 
13
namespace Botan {
 
14
 
 
15
/**
 
16
* Encrypt a key under a key encryption key using the algorithm
 
17
* described in RFC 3394
 
18
*
 
19
* @param key the plaintext key to encrypt
 
20
* @param kek the key encryption key
 
21
* @return key encrypted under kek
 
22
*/
 
23
secure_vector<uint8_t> BOTAN_PUBLIC_API(2,0) rfc3394_keywrap(const secure_vector<uint8_t>& key,
 
24
                                                             const SymmetricKey& kek);
 
25
 
 
26
/**
 
27
* Decrypt a key under a key encryption key using the algorithm
 
28
* described in RFC 3394
 
29
*
 
30
* @param key the encrypted key to decrypt
 
31
* @param kek the key encryption key
 
32
* @return key decrypted under kek
 
33
*/
 
34
secure_vector<uint8_t> BOTAN_PUBLIC_API(2,0) rfc3394_keyunwrap(const secure_vector<uint8_t>& key,
 
35
                                                               const SymmetricKey& kek);
 
36
 
 
37
}
 
38
 
 
39
#endif