From: Luke Kenneth Casson Leighton Date: Sun, 17 Sep 2023 12:20:57 +0000 (+0100) Subject: add a quick usage demo to poly1305.py, to serve later as a check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6333f4eb539420f14dd79fc7bfc4bc7c35ade637;p=openpower-isa.git add a quick usage demo to poly1305.py, to serve later as a check --- diff --git a/src/openpower/decoder/isa/poly1305.py b/src/openpower/decoder/isa/poly1305.py index 83411597..93f37afd 100644 --- a/src/openpower/decoder/isa/poly1305.py +++ b/src/openpower/decoder/isa/poly1305.py @@ -46,3 +46,9 @@ class Poly1305(object): self.acc += self.s return self.num_to_16_le_bytes(self.acc) + +# quick usage demo +if __name__ == '__main__': + key = list(range(223, 255)) + mac = Poly1305(key).create_tag(bytearray(range(0,32))) + print (mac)