-USING: base64 io.encodings.ascii io.encodings.string kernel
-sequences splitting strings tools.test ;
+USING: base64 byte-arrays io.encodings.ascii io.encodings.string
+kernel sequences splitting strings tools.test ;
+
+{ t } [ 256 <iota> >byte-array dup >base64 base64> = ] unit-test
{ "abcdefghijklmnopqrstuvwxyz" } [ "abcdefghijklmnopqrstuvwxyz" ascii encode >base64 base64> ascii decode
] unit-test
! Copyright (C) 2019 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
-USING: base32 sequences tools.test ;
+USING: base32 byte-arrays kernel sequences tools.test ;
+
+{ t } [ 256 <iota> >byte-array dup >base32 base32> = ] unit-test
{ B{ } } [ f >base32 ] unit-test
{ B{ } } [ B{ } >base32 ] unit-test
-USING: base85 kernel strings tools.test ;
+USING: base85 byte-arrays kernel sequences strings tools.test ;
-{ t } [ "Hello, world" dup >base85 base85> >string = ] unit-test
-{ t } [ "ready" dup >base85 base85> >string = ] unit-test
+{ t } [ 256 <iota> >byte-array dup >base85 base85> = ] unit-test
{ "NM!" } [ "He" >base85 >string ] unit-test
{ t } [ "He" dup >base85 base85> >string = ] unit-test