Package gnu.java.zrtp.utils
Class EmojiBase32
- java.lang.Object
-
- gnu.java.zrtp.utils.EmojiBase32
-
public class EmojiBase32 extends Object
Implements the base32 Emoji functions. Some technical details: - add a new SAS algorithm to the ZRTP library that uses 32 Unicode code points instead of 32 ASCII characters. - select 32 emojis that are easily distinguishable, known to everyone, not offending etc, using standard Unicode code points - select colored emojis that look good on white and on black backgrounds (many emojis look good on white only) - select emojis that are available on iOS, Android, Mac OS X (Windows?) I used the information on this Unicode page http://unicode.org/emoji/charts/full-emoji-list.html Created by werner on 30.12.15.
-
-
Constructor Summary
Constructors Constructor Description EmojiBase32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringbinary2ascii(byte[] os, int lengthInBits)Encode binary data into a Base32 string.
-
-
-
Method Detail
-
binary2ascii
public static String binary2ascii(byte[] os, int lengthInBits)
Encode binary data into a Base32 string. The method returns a string that contains the emoji base32 encoded data.- Parameters:
os- The byte array containing the binary data. The length must be at least (lengthInBits + 7) / 8 .lengthInBits- Defines how may bits of the binary data shall be encoded into a base32 string.- Returns:
- The string containing the base32 encoded data.
-
-