Class Bytes
java.lang.Object
org.springframework.security.web.webauthn.api.Bytes
An object representation of byte[].
- Since:
- 6.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static Bytes
fromBase64
(String base64UrlString) Creates a new instance from a base64 url string.byte[]
getBytes()
Gets the raw bytes.int
hashCode()
static Bytes
random()
Creates a secure randomBytes
with random bytes and sufficient entropy.Gets the bytes as Base64 URL encoded String.toString()
-
Constructor Details
-
Bytes
public Bytes(byte[] bytes) Creates a new instance- Parameters:
bytes
- the raw base64UrlString that will be encoded.
-
-
Method Details
-
getBytes
public byte[] getBytes()Gets the raw bytes.- Returns:
- the bytes
-
toBase64UrlString
Gets the bytes as Base64 URL encoded String.- Returns:
-
equals
-
hashCode
public int hashCode() -
toString
-
random
Creates a secure randomBytes
with random bytes and sufficient entropy.- Returns:
- a new secure random generated
Bytes
-
fromBase64
Creates a new instance from a base64 url string.- Parameters:
base64UrlString
- the base64 url string- Returns:
- the
Bytes
-