A | is named a pipe and connects stdout of the left command to the stdin of the right command of the pipe.
As you have may have noticed in some/many of my example code I use:
do shell script "/bin/echo -n hello world"
That is not the shell’s built in echo command which has a few options more than the buil-in version. With the option -n you tell echo not to print a traling newline.
Because openssl likes to read from stdin, which is not that uncommond for command line utilities, you should use
set mydata to "rtyeylohyvuftydyrerussy"
do shell script "/bin/echo -n " & quoted form of mydata & "| openssl sha1"