// Hex returns an EIP55-compliant hex string representation of the address.
Hex returns an EIP55-compliant hex string representation of the address.
// Hex returns an EIP55 - compliant hex string representation of the address .
func (a Address) Hex() string {
	unchecksummed := hex.EncodeToString(a[:])
	hasher := RealCipher.Hasher()
	hasher.Write([]byte(unchecksummed))
	hash := hasher.Sum(nil)
	result := []byte(unchecksummed)
	for i := 0; i < len(result); i++ {
		hashByte := hash[i/2]
		if i%2 == 0 {
			hashByte = hashByte >> 4
		} else {
			hashByte &= 0xf
		}
		if result[i] > '9' && hashByte > 7 {
			result[i] -= 32
		}
	}
	return "0x" + string(result)
}
func ( a Address ) Hex ( ) string { unchecksummed := hex . EncodeToString ( a [ : ] ) hasher := RealCipher . Hasher ( ) hasher . Write ( [ ] byte ( unchecksummed ) ) hash := hasher . Sum ( nil ) result := [ ] byte ( unchecksummed ) for i := 0 ; i < len ( result ) ; i ++ { hashByte := hash [ i / 2 ] if i % 2 == 0 { hashByte = hashByte >> 4 } else { hashByte &= 0xf } if result [ i ] > '9' && hashByte > 7 { result [ i ] -= 32 } } return " " + string ( result ) }
Hex returns an EIP55-compliant hex string representation of the address.
Hex returns an EIP55 - compliant hex string representation of the address .
// sha := GetHash256()