Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторная работа №21 / Serpent_vb_1 / howtouse
.txt Simply add the class file to your project and declare it in your modules, subs or functions:
Dim Serpent as New clsSerpent
To encrypt a string go:
Dim r As String
r = "This is an example string."
r = Serpent.EncryptString(r, "secretkey")
To decrypt a string go:
r = Serpent.DecryptString(VariableName, "secretkey")
The key is optional and so is an option to return ciphered text in hex format. Converting to hex allows for more stable transport of unstable mediums such as chat or email but increases the string size nearly double:
Dim r As String
r = "This is a sample string."
r = Serpent.EncryptString(r, "secretkey", True) ' Emphasis on boolean value
If you don't understand any of that then there shouldn't be a need for you to work with cryptography if you dont understand basic programming. :) Good luck!
Dim Serpent as New clsSerpent
To encrypt a string go:
Dim r As String
r = "This is an example string."
r = Serpent.EncryptString(r, "secretkey")
To decrypt a string go:
r = Serpent.DecryptString(VariableName, "secretkey")
The key is optional and so is an option to return ciphered text in hex format. Converting to hex allows for more stable transport of unstable mediums such as chat or email but increases the string size nearly double:
Dim r As String
r = "This is a sample string."
r = Serpent.EncryptString(r, "secretkey", True) ' Emphasis on boolean value
If you don't understand any of that then there shouldn't be a need for you to work with cryptography if you dont understand basic programming. :) Good luck!
Соседние файлы в папке Serpent_vb_1