예제 #1
0
파일: testAES256.py 프로젝트: daedalus/misc
def makeIV():
	IV = Random.new().read(BLOCK_SIZE)
	return base64.b4encode(IV)
예제 #2
0
 def save_file(self, name, data):
     f = open(self.path + name, 'w')
     json_data = json.dumps(data)
     f.write(json_data)
     compact_data = base64.b4encode(json_data)
     self.redis.hset(self.key, name, compact_data)
예제 #3
0
import os
import base64

from .base import *

# We def don't want this in prod
DEBUG = False

# Generates random 28 byte string
SECRET_KEY = base64.b4encode(os.urandom(28)).decode('utf-8')

# Used in nginx and upstart scripts
SITENAME = 'nezaj-lists.com'
예제 #4
0
 def save_file(self, name, data):
     f = open(self.path + name, "w")
     json_data = json.dumps(data)
     f.write(json_data)
     compact_data = base64.b4encode(json_data)
     self.redis.hset(self.key, name, compact_data)
예제 #5
0
def makeIV():
	IV = Random.new().read(BLOCK_SIZE)
	return base64.b4encode(IV)