From 6333f4eb539420f14dd79fc7bfc4bc7c35ade637 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 17 Sep 2023 13:20:57 +0100 Subject: [PATCH] add a quick usage demo to poly1305.py, to serve later as a check --- src/openpower/decoder/isa/poly1305.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.30.2