Docs Menu

Class Utils

On this page

  • io.realm.transformer
  • Constructors
  • Method Summary
  • Inherited Methods
  • Constructor Detail
  • Method Detail
  • base64Encode
  • hexStringify
  • isSyncEnabled
  • sha256Hash
java.lang.Object
io.realm.transformer.Utils
Constructor and Description
Modifier and Type
Method and Description
public static String

Encode the given string with Base64

public static String
byte[] data
)

Convert a byte array to its hex-string

public static boolean
Project project
)
public static byte
byte[] data
)

Compute the SHA-256 hash of the given byte array

  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize
public Utils ()

public static String base64Encode (
String data
)

Encode the given string with Base64

Parameters

  • data - the string to encode

Returns

the encoded string

Throws

public static String hexStringify (
byte[] data
)

Convert a byte array to its hex-string

Parameters

  • data - the byte array to convert

Returns

the hex-string of the byte array

public static boolean isSyncEnabled (
Project project
)
public static byte sha256Hash (
byte[] data
)

Compute the SHA-256 hash of the given byte array

Parameters

  • data - the byte array to hash

Returns

the hashed byte array

Throws

Welcome to the Realm Docs →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.