code: func HashEncoded(ctx *Context, password []byte, salt []byte) (string, error) {
  	if ctx == nil {
  		return "", ErrContext
  	}
  
  	if len(password) == 0 {
  		return "", ErrPassword
  	}
  	if len(salt) == 0 {
  		return "", ErrSalt
  	}
  
  	encodedlen := C.argon2_encodedlen(
  		C.uint32_t(ctx.Iterations),
  		C.uint32_t(ctx.Memory),
  		C.uint32_t(ctx.Parallelism),
  		C.uint32_t(len(salt)),
  		C.uint32_t(ctx.HashLen),
  		C.argon2_type(ctx.Mode))
  
  	s := make([]byte, encodedlen)
  
  	result := C.argon2_hash(
  		C.uint32_t(ctx.Iterations),
  		C.uint32_t(ctx.Memory),
  		C.uint32_t(ctx.Parallelism),
  		unsafe.Pointer(&password[0]), C.size_t(len(password)),
  		unsafe.Pointer(&salt[0]), C.size_t(len(salt)),
  		nil, C.size_t(ctx.HashLen),
  		(*C.char)(unsafe.Pointer(&s[0])), C.size_t(encodedlen),
  		C.argon2_type(ctx.Mode),
  		C.uint32_t(ctx.Version))
  
  	if result != C.ARGON2_OK {
  		return "", Error(result)
  	}
  
  	// Strip trailing null byte(s)
  	s = bytes.TrimRight(s, "\x00")
  	return string(s), nil
  }
docs: // HashEncoded hashes a password and produces a crypt-like encoded string.