![Renis](/assets/img/avatar_default.png)
New charts: * ceph-mon * ceph-osd * ceph-client Deleted: * ceph Co-authored-by: Randeep Jalli <rj2083@att.com> Co-authored-by: Pete Birley <pete@port.direct> Change-Id: Ic476f5839e749f5765d44d46bcfd4eae9ef96849
15 lines
367 B
Smarty
15 lines
367 B
Smarty
#!/bin/python
|
|
import os
|
|
import struct
|
|
import time
|
|
import base64
|
|
key = os.urandom(16)
|
|
header = struct.pack(
|
|
'<hiih',
|
|
1, # le16 type: CEPH_CRYPTO_AES
|
|
int(time.time()), # le32 created: seconds
|
|
0, # le32 created: nanoseconds,
|
|
len(key), # le16: len(key)
|
|
)
|
|
print(base64.b64encode(header + key).decode('ascii'))
|