Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Auto generation of password
Author:
vijay prakash
E-mail:
Click to e-mail author
Website:
http://vijay-vicon.blogspot.com
Submitted:
1/21/2009
Version:
VB.NET 2003
Compatibility:
VB.NET 2003, VB 2005, VB 2008
Category:
String Manipulation
Views:
18190
It automatically generates passwords for the given user name based on the characters given in the name. It overcomes the disadvantages of random generation of password. It is independnt of the user name length.
Declarations:
public n as byte public s as string dim a(25) as byte public m as char dim b(25) as byte public x as byte public i as byte public g as integer public v as charector
Code:
try console.writeline("enter the name:") s=console.readline() a(0)=97 g=25 b(0)=7 for i = 1 to g a(i)=a(i-1)+1 b(i)=b(i-1)+2 next dim c as char for each m in s n= system.convert.tobyte(m) if n>122 or n>60 then console.write(n*2) else for i = 0 to 25 if a(i)=n then x=n-b(i) v=system.convert.tochar(x) c=v.tosting console.write(c.tolower(c)) end if next end if next catch ex as exception console.writeline(ex.message) end try
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement