utility to decode personas

pull/5/head
Zlatin Balevsky 2019-06-30 10:41:42 +01:00
parent 21034209a5
commit 3fefbc94b3
1 changed files with 9 additions and 0 deletions

View File

@ -82,4 +82,13 @@ public class Persona {
Persona other = (Persona)o Persona other = (Persona)o
name.equals(other.name) && destination.equals(other.destination) name.equals(other.name) && destination.equals(other.destination)
} }
public static void main(String []args) {
if (args.length != 1) {
println "This utility decodes a bas64-encoded persona"
System.exit(1)
}
Persona p = new Persona(new ByteArrayInputStream(Base64.decode(args[0])))
println p.getHumanReadableName()
}
} }