X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/35548a2c9ae7efae920ec7c90addad272b5520c3..40ba7c29763bfe39154f8b6444bf8b3b4ad0c56c:/src/ssh_keys/models.py diff --git a/src/ssh_keys/models.py b/src/ssh_keys/models.py index e4841ca..3bd49f8 100644 --- a/src/ssh_keys/models.py +++ b/src/ssh_keys/models.py @@ -10,6 +10,7 @@ class SSHKey(models.Model): comment = models.CharField(_('comment'), max_length=255, editable=False) algorithm = models.CharField(_('algorithm'), max_length=32, editable=False) bit_length = models.IntegerField(_('bit length'), null=True, editable=False) + sha256_hash = models.CharField(_('SHA256 hash'), max_length=128, editable=False) md5_hash = models.CharField(_('MD5 hash'), max_length=128, editable=False) created_at = models.DateTimeField(_('created at'), auto_now_add=True) last_seen_at = models.DateTimeField(_('last seen at'), null=True, editable=False) @@ -29,4 +30,5 @@ class SSHKey(models.Model): self.algorithm = det['algo'] self.bit_length = det['bits'] self.md5_hash = det['md5'] + self.sha256_hash = det['sha256'] return super().save(*args, **kwargs)