i need to make a sha512
-
i would like to make a sha512 but i don't want to use the ones provided by visual studio. can some help
J.Hardy
-
i would like to make a sha512 but i don't want to use the ones provided by visual studio. can some help
J.Hardy
So what do you want to use?? Google for "SHA512 library" and see what you come up with.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
So what do you want to use?? Google for "SHA512 library" and see what you come up with.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008searched Google and found this going to try to adapt it, do you think this will work?
Option Explicit
'****************************************************************************************
'API CONSTANTS
'****************************************************************************************
Private Enum EditTypes
WM_CUT = &H300
WM_COPY = &H301
WM_PASTE = &H302
WM_CLEAR = &H303
WM_UNDO = &H304
End EnumConst EM_CANUNDO = &HC6
Const EM_GETMODIFY = &HB8'****************************************************************************************
'API FUNCTIONS
'****************************************************************************************
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long'****************************************************************************************
'CONSTANTS - PRIVATE
'****************************************************************************************
'filter for dialog
Private Const mFILEMASK = "Text Files (*.txt)|*.txt|" & _
"Encrypted Text Files (*.etf)|*.etf|" & _
"All Files (*.*)|*.*"
'Initial caption for form
Private Const mCAPTION = "Text Encryption Utility"'edit menu item constants
Const mUNDO = 0
Const mCUT = 2
Const mCOPY = 3
Const mPASTE = 4
Const mDELETE = 5
'toolbar item constants
Const mUNDOTOOL = 7
Const mCUTTOOL = 8
Const mCOPYTOOL = 9
Const mPASTETOOL = 10
Const mDELETETOOL = 11'encoder increment value - needs to be same for encryption and decryption
Const mENCODE = 3'****************************************************************************************
'VARIABLES - PRIVATE
'****************************************************************************************
'flag to track status of control key - True means control key is pressed
Private mbControlKey As Boolean
'flag to track changes in open document
Private mbIsDirty As Boolean
Private msFileTitle As String'****************************************************************************************
'EVENTS - PRIVATE
'****************************************************************************************
Private Sub Form_Activate()
ToggleEditMenu
mbIsDirty = False
End SubPrivate Sub Form_Load()
Call NewDocument
End SubPrivate Sub Form_QueryUnload(Cancel As In
-
searched Google and found this going to try to adapt it, do you think this will work?
Option Explicit
'****************************************************************************************
'API CONSTANTS
'****************************************************************************************
Private Enum EditTypes
WM_CUT = &H300
WM_COPY = &H301
WM_PASTE = &H302
WM_CLEAR = &H303
WM_UNDO = &H304
End EnumConst EM_CANUNDO = &HC6
Const EM_GETMODIFY = &HB8'****************************************************************************************
'API FUNCTIONS
'****************************************************************************************
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long'****************************************************************************************
'CONSTANTS - PRIVATE
'****************************************************************************************
'filter for dialog
Private Const mFILEMASK = "Text Files (*.txt)|*.txt|" & _
"Encrypted Text Files (*.etf)|*.etf|" & _
"All Files (*.*)|*.*"
'Initial caption for form
Private Const mCAPTION = "Text Encryption Utility"'edit menu item constants
Const mUNDO = 0
Const mCUT = 2
Const mCOPY = 3
Const mPASTE = 4
Const mDELETE = 5
'toolbar item constants
Const mUNDOTOOL = 7
Const mCUTTOOL = 8
Const mCOPYTOOL = 9
Const mPASTETOOL = 10
Const mDELETETOOL = 11'encoder increment value - needs to be same for encryption and decryption
Const mENCODE = 3'****************************************************************************************
'VARIABLES - PRIVATE
'****************************************************************************************
'flag to track status of control key - True means control key is pressed
Private mbControlKey As Boolean
'flag to track changes in open document
Private mbIsDirty As Boolean
Private msFileTitle As String'****************************************************************************************
'EVENTS - PRIVATE
'****************************************************************************************
Private Sub Form_Activate()
ToggleEditMenu
mbIsDirty = False
End SubPrivate Sub Form_Load()
Call NewDocument
End SubPrivate Sub Form_QueryUnload(Cancel As In
-
searched Google and found this going to try to adapt it, do you think this will work?
Option Explicit
'****************************************************************************************
'API CONSTANTS
'****************************************************************************************
Private Enum EditTypes
WM_CUT = &H300
WM_COPY = &H301
WM_PASTE = &H302
WM_CLEAR = &H303
WM_UNDO = &H304
End EnumConst EM_CANUNDO = &HC6
Const EM_GETMODIFY = &HB8'****************************************************************************************
'API FUNCTIONS
'****************************************************************************************
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long'****************************************************************************************
'CONSTANTS - PRIVATE
'****************************************************************************************
'filter for dialog
Private Const mFILEMASK = "Text Files (*.txt)|*.txt|" & _
"Encrypted Text Files (*.etf)|*.etf|" & _
"All Files (*.*)|*.*"
'Initial caption for form
Private Const mCAPTION = "Text Encryption Utility"'edit menu item constants
Const mUNDO = 0
Const mCUT = 2
Const mCOPY = 3
Const mPASTE = 4
Const mDELETE = 5
'toolbar item constants
Const mUNDOTOOL = 7
Const mCUTTOOL = 8
Const mCOPYTOOL = 9
Const mPASTETOOL = 10
Const mDELETETOOL = 11'encoder increment value - needs to be same for encryption and decryption
Const mENCODE = 3'****************************************************************************************
'VARIABLES - PRIVATE
'****************************************************************************************
'flag to track status of control key - True means control key is pressed
Private mbControlKey As Boolean
'flag to track changes in open document
Private mbIsDirty As Boolean
Private msFileTitle As String'****************************************************************************************
'EVENTS - PRIVATE
'****************************************************************************************
Private Sub Form_Activate()
ToggleEditMenu
mbIsDirty = False
End SubPrivate Sub Form_Load()
Call NewDocument
End SubPrivate Sub Form_QueryUnload(Cancel As In
First of all, it's VB6 code, not VB.NET and most of which has nothing to do with SHA512 at all. Next, if this is your level of knowledge, you'd be MUCH better off usingthe built in library and not trying to do this yourself.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
i would like to make a sha512 but i don't want to use the ones provided by visual studio. can some help
J.Hardy
moonshaddow wrote:
sha512 but i don't want to use the ones provided by visual studio
Why not? Until people understand what your objection to the built in version is they are unlikely to help you. The reason is that the built in SHA512 encryption is already optimised and stable. This is something you are unlikely to have the time to do.
Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog
-
i would like to make a sha512 but i don't want to use the ones provided by visual studio. can some help
J.Hardy
-
oh well, don't worry, i am going to learn about sha512 and i'm thinking of trying to adapt the one in wiki, but thanks anyway
J.Hardy
-
searched Google and found this going to try to adapt it, do you think this will work?
Option Explicit
'****************************************************************************************
'API CONSTANTS
'****************************************************************************************
Private Enum EditTypes
WM_CUT = &H300
WM_COPY = &H301
WM_PASTE = &H302
WM_CLEAR = &H303
WM_UNDO = &H304
End EnumConst EM_CANUNDO = &HC6
Const EM_GETMODIFY = &HB8'****************************************************************************************
'API FUNCTIONS
'****************************************************************************************
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) _
As Long'****************************************************************************************
'CONSTANTS - PRIVATE
'****************************************************************************************
'filter for dialog
Private Const mFILEMASK = "Text Files (*.txt)|*.txt|" & _
"Encrypted Text Files (*.etf)|*.etf|" & _
"All Files (*.*)|*.*"
'Initial caption for form
Private Const mCAPTION = "Text Encryption Utility"'edit menu item constants
Const mUNDO = 0
Const mCUT = 2
Const mCOPY = 3
Const mPASTE = 4
Const mDELETE = 5
'toolbar item constants
Const mUNDOTOOL = 7
Const mCUTTOOL = 8
Const mCOPYTOOL = 9
Const mPASTETOOL = 10
Const mDELETETOOL = 11'encoder increment value - needs to be same for encryption and decryption
Const mENCODE = 3'****************************************************************************************
'VARIABLES - PRIVATE
'****************************************************************************************
'flag to track status of control key - True means control key is pressed
Private mbControlKey As Boolean
'flag to track changes in open document
Private mbIsDirty As Boolean
Private msFileTitle As String'****************************************************************************************
'EVENTS - PRIVATE
'****************************************************************************************
Private Sub Form_Activate()
ToggleEditMenu
mbIsDirty = False
End SubPrivate Sub Form_Load()
Call NewDocument
End SubPrivate Sub Form_QueryUnload(Cancel As In
That isn't SHA512. Its not even SHA. Its not even a hash. It barely even counts as encryption. Its an extremely weak obfuscation using a key of "3". Its about as secure as ROT13. This is why you ALWAYS use the built in functions. You SHOULD NOT try to make your own implementation, because at best you are wasting your time, and more likely you will screw something up. You should NEVER, EVER, EVER try to design your own encryption algorithm, because when people try to do this they end up with something which is trivially vulnerable because they don't understand the maths behind it. Use the built in API.
Mark Churchill Director, Dunn & Churchill Pty Ltd Free Download: Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio.
Alpha release: Entanglar: Transparant multiplayer framework for .Net games.