Class BCryptPasswordImpl.CyclicByteBuffer
- java.lang.Object
-
- org.wildfly.security.password.impl.BCryptPasswordImpl.CyclicByteBuffer
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- BCryptPasswordImpl
private static class BCryptPasswordImpl.CyclicByteBuffer extends Object implements Serializable
This class implements a cyclic byte buffer. It defines utility methods to retrieve the next byte or int from the underlying byte[] in a cyclic manner.
-
-
Constructor Summary
Constructors Constructor Description CyclicByteBuffer(byte[] buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) byte
readNextByte()
Reads the next byte from the buffer.(package private) int
readNextInt()
Reads the next int (four bytes) from the buffer.
-
-
-
Method Detail
-
readNextByte
byte readNextByte()
Reads the next byte from the buffer. The current position is incremented by one (mod buffer.length).- Returns:
- the byte that was read from the cyclic buffer.
-
readNextInt
int readNextInt()
Reads the next int (four bytes) from the buffer. The current position is incremented by four (mod buffer.length).- Returns:
- the int that was read from the cyclic buffer.
-
-