Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

SecureYou 1.0 | PHP Library To Login/Register

Secure You

About:
Spoiler (Click to View)

Sample Code:
Spoiler (Click to View)

Supported Versions:
Spoiler (Click to View)

Source Code:
Spoiler (Click to View)

Good Day!
good job i need some improvement's but good so far
(Apr 15, 2017 11:57 PM)EagleEye Wrote:  good job i need some improvement's but good so far

Thank you, Sure! I will add many more things in future updates
(Apr 16, 2017 07:41 AM)Yani Wrote:  Please don't make your own "encryption" for the password stuff. Use password_hash() and password_verify().

Right now it's not safe.

Sure because You can choose the size of the hash .. but hey, good point, for it to be used in web pages as crack? With a simple md5? That does not mean anything.

EDIT: And look well the function, is right .. in a while I publish the new version, with resetpassword and more things, Regards!
Sorry, I have already edited the post, if, as you say, it is a better idea, in a while I will publish that, because it is more efficient as well mentioned.
what the fuck is this

why are you using one time pad for passwords, in fact why are you using ciphers at all



oh look now i've got your private key and all your passwords
(Apr 16, 2017 08:13 AM)ASDA Wrote:  what the fuck is this

why are you using one time pad for passwords, in fact why are you using ciphers at all



oh look now i've got your private key and all your passwords

If you did not use it well, as I said before. I will improve the FUCKING encryption of the passwords, happy? ...
(Apr 16, 2017 08:16 AM)alemalakra Wrote:  If you did not use it well, as I said before. I will improve the FUCKING encryption of the passwords, happy? ...

calm down pal and it'd be better if you didn't use encryption at all

don't embarrass yourself
You will see how the code will grow, for tomorrow I will have SMTP support, with password reset and more things, I do not get angry, I ask you for your point of view
(Apr 16, 2017 08:19 AM)alemalakra Wrote:  You will see how the code will grow, for tomorrow I will have SMTP support, with password reset and more things, I do not get angry, I ask you for your point of view

congratulations, i'm so proud of you & you got angry in your previous post, pipe down
Ok .. if you want to talk, send me skype: live: alemalakra
I already sent you request in tox, but you do not accept, here my tox id:
95E1574E91EE93CC2299B777A7EA5825BF290092E1BA2F3B2781F0264197433A8FB4FB6F7A47
Wanna improve your code? Let's step through it together.

1. You're using dependency injection, which is good - but you aren't declaring the variable as required to be PDO.


PHP Code

<?php 
public function __construct(\PDO $pdo, $encrypt){} 


2. You should probably be using a singleton pattern for the session_start, or wrap it inside it's own wrapper class so you can properly unit test this class. I'd probably op for a existing session management system - just google, there is bound to be tonnes. Be sure to use composer.

3. Use a proper password encryption engine like password_hash with BCRYPT. You're asking for trouble using base64...

4. Other than some small abstractions this isn't a terrible class. Be sure when you add new features you don't bloat your base code, and add functionality through dependencies.
(Apr 16, 2017 11:22 PM)MineSQL Wrote:  Wanna improve your code? Let's step through it together.

1. You're using dependency injection, which is good - but you aren't declaring the variable as required to be PDO.


PHP Code

<?php 
public function __construct(\PDO $pdo, $encrypt){} 


2. You should probably be using a singleton pattern for the session_start, or wrap it inside it's own wrapper class so you can properly unit test this class. I'd probably op for a existing session management system - just google, there is bound to be tonnes. Be sure to use composer.

3. Use a proper password encryption engine like password_hash with BCRYPT. You're asking for trouble using base64...

4. Other than some small abstractions this isn't a terrible class. Be sure when you add new features you don't bloat your base code, and add functionality through dependencies.

in a 1 hour, i add the new version, session in database support, and more things, Thanks!


@MineSQL Check Out New Version: https://github.com/Alemalakra/SecureYou/...ureyou.php
Looking for your updates. :)
Amateurs hack systems, professionals hack people.
[Image: sm7aNCw.gif]
(Apr 16, 2017 11:22 PM)MineSQL Wrote:  Wanna improve your code? Let's step through it together.

1. You're using dependency injection, which is good - but you aren't declaring the variable as required to be PDO.


PHP Code

<?php 
public function __construct(\PDO $pdo, $encrypt){} 


2. You should probably be using a singleton pattern for the session_start, or wrap it inside it's own wrapper class so you can properly unit test this class. I'd probably op for a existing session management system - just google, there is bound to be tonnes. Be sure to use composer.

3. Use a proper password encryption engine like password_hash with BCRYPT. You're asking for trouble using base64...

4. Other than some small abstractions this isn't a terrible class. Be sure when you add new features you don't bloat your base code, and add functionality through dependencies.

Big up for giving constructive criticism, who knows the class might even be popular in the future?

Keep working OP and learn how to handle criticism, I believe in you, the trick to success is time and effort which means if you put enough time into it then one day it'll be one of a kind.
In the land of the blind, the one-eyed man is king

Blood makes you related, but loyalty makes you family



Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by BuyingSpadeJun 29, 2021 01:41 AM 6 277 Jun 29, 2021 01:41 AM
Last Post: Mongrel
[PHP] by BuyingSpadeJun 25, 2021 05:06 AM 0 153 Jun 25, 2021 05:06 AM
Last Post: BuyingSpade
[PHP] by SIM-4062753May 15, 2020 08:38 PM 1 201 May 15, 2020 08:38 PM
Last Post: maxamity