Create an SHA-2 encryption algorithm in Python using a provided string "abc".
abc
import hashlib

s = 'abc'.encode("utf-8")

hash_object = hashlib.sha256(s)
hex_dig = hash_object.hexdigest()
print(hex_dig)