< prev index next >
src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java
Print this page
*** 25,34 ****
--- 25,35 ----
package com.sun.crypto.provider;
import java.security.InvalidKeyException;
+ import jdk.internal.HotSpotIntrinsicCandidate;
/**
* This class represents ciphers in counter (CTR) mode.
*
* <p>This mode is implemented independently of a particular cipher.
*** 167,176 ****
--- 168,178 ----
* Do the actual encryption/decryption operation.
* Essentially we XOR the input plaintext/ciphertext stream with a
* keystream generated by encrypting the counter values. Counter values
* are encrypted on demand.
*/
+ @HotSpotIntrinsicCandidate
private int crypt(byte[] in, int inOff, int len, byte[] out, int outOff) {
int result = len;
while (len-- > 0) {
if (used >= blockSize) {
embeddedCipher.encryptBlock(counter, 0, encryptedCounter, 0);
< prev index next >