def perform_privkey_add(self, intent):
async with self.connection.acquire() as conn:
async with conn.cursor() as cur:
try:
await cur.execute("INSERT INTO privkeys VALUES (%s, %s);",
(intent.hash, intent.cipherkey))
except IntegrityError:
raise PrivKeyHashCollision('Hash collision, change your password and retry.')
评论列表
文章目录