mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8285743: Ensure each IntegerPolynomial object is only created once
Reviewed-by: xuelei, ascarpino
This commit is contained in:
parent
29ccb8fbb8
commit
397d095f66
10 changed files with 42 additions and 491 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -48,8 +48,8 @@ final class Poly1305 {
|
|||
private static final int BLOCK_LENGTH = 16;
|
||||
private static final int TAG_LENGTH = 16;
|
||||
|
||||
private static final IntegerFieldModuloP ipl1305 =
|
||||
new IntegerPolynomial1305();
|
||||
private static final IntegerFieldModuloP ipl1305
|
||||
= IntegerPolynomial1305.ONE;
|
||||
|
||||
private byte[] keyBytes;
|
||||
private final byte[] block = new byte[BLOCK_LENGTH];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue