Skip to content

Instantly share code, notes, and snippets.

@martinjt
Created June 25, 2020 15:02
Show Gist options
  • Save martinjt/7275f60f97333575bfd9abe2bae25d72 to your computer and use it in GitHub Desktop.
Save martinjt/7275f60f97333575bfd9abe2bae25d72 to your computer and use it in GitHub Desktop.
hash for identity server
DECLARE @HASHBYTES VARBINARY(128) = hashbytes('sha2_256', N'secret')
SELECT cast(N'' as xml).value('xs:base64Binary(sql:variable("@HASHBYTES"))', 'varchar(128)');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment