예제 #1
0
        public static byte[] DecodeDebug(string encoded, out AddressType type)
        {
#endif
            var squashed = Bech32.DecodeSquashed(encoded);
            type = (AddressType)Bech32.Bytes5to8(squashed.SubArray(0, 2))[0];
            return(Bech32.Bytes5to8(squashed.SubArray(2, squashed.Length - 2)));
        }
예제 #2
0
        public static string EncodeDebug(AddressType type, byte[] data)
        {
#endif
            var header = Bech32.Bytes8to5(new [] { (byte)type });
            var body   = Bech32.Bytes8to5(data);
            return(Bech32.EncodeSquashed((header.Append(body))));
        }