onion: remove onion key column, prod forms
This commit is contained in:
parent
890ce3077f
commit
e1394f71d6
4 changed files with 68 additions and 20 deletions
|
@ -19,7 +19,6 @@ class Onion(AbstractConfiguration):
|
|||
|
||||
group_id = db.Column(db.Integer(), db.ForeignKey("group.id"), nullable=False)
|
||||
domain_name = db.Column(db.String(255), nullable=False)
|
||||
onion_name = db.Column(db.String(56), nullable=False, unique=True)
|
||||
|
||||
onion_public_key = db.Column(db.LargeBinary, nullable=False)
|
||||
onion_private_key = db.Column(db.LargeBinary, nullable=False)
|
||||
|
@ -30,7 +29,7 @@ class Onion(AbstractConfiguration):
|
|||
group = db.relationship("Group", back_populates="onions")
|
||||
|
||||
@property
|
||||
def calculated_onion_name(self):
|
||||
def onion_name(self) -> str:
|
||||
p = self.onion_public_key[32:]
|
||||
|
||||
h = hashlib.sha3_256()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue