Class 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 Detail

      • EmojiBase32

        public EmojiBase32()
    • 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.