25 lines
391 B
Plaintext
25 lines
391 B
Plaintext
=RFC 1924 Tests=
|
|
|
|
Copyright (c) 2008-2012, David P. D. Moss. All rights reserved.
|
|
|
|
The example from the RFC.
|
|
|
|
{{{
|
|
|
|
>>> from netaddr.ip.rfc1924 import ipv6_to_base85, base85_to_ipv6
|
|
|
|
>>> ip_addr = '1080::8:800:200c:417a'
|
|
|
|
>>> ip_addr
|
|
'1080::8:800:200c:417a'
|
|
|
|
>>> base85 = ipv6_to_base85(ip_addr)
|
|
|
|
>>> base85
|
|
'4)+k&C#VzJ4br>0wv%Yp'
|
|
|
|
>>> base85_to_ipv6(base85)
|
|
'1080::8:800:200c:417a'
|
|
|
|
}}}
|