]> Pileus Git - ~andy/spades/blobdiff - src/org/pileus/spades/Os.java
Add support for SASL PLAIN authentication
[~andy/spades] / src / org / pileus / spades / Os.java
index 767de064b81dc08cfaa2fd73d4ab9a3b10f1c6eb..4f9e0fb4ce0d62d70d2adefd9231f643d5ffcf65 100644 (file)
@@ -1,6 +1,7 @@
 package org.pileus.spades;
 
 import android.util.Log;
+import android.util.Base64;
 
 public class Os
 {
@@ -13,4 +14,10 @@ public class Os
        {
                Log.d("Spades", txt);
        }
+
+       /* Utilities */
+       public static String base64(String txt)
+       {
+               return Base64.encodeToString(txt.getBytes(), 0);
+       }
 }