| 28 | } |
| 29 | |
| 30 | QByteArray EncryptionKey::generateRandomEncryptionKey() { |
| 31 | QByteArray data(getSizeOfEncryptionKeyInBytes(), 0x00); |
| 32 | randombytes_buf(data.data(), getSizeOfEncryptionKeyInBytes()); |
| 33 | |
| 34 | return data; |
| 35 | } |
| 36 | |
| 37 | unsigned char const* EncryptionKey::getEncryptionKeyAsCharPtr() const { |
| 38 | return reinterpret_cast<unsigned char const*>(encryptionKey.data()); |