Appendix B. Contents of SecurityLibrary.vb

This appendix shows you how to use the contents of SecurityLibrary.vb and RoleBasedSecurity.vb, the library of functions you built in the early chapters of this book.

Hash Digests

The following code creates a SHA-1 hash of the string strSource, and it assigns the result to the string strMyHash:

strMyHash = Hash.CreateHash(strSource)

Get Security for Microsoft® Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.