Differences From Artifact [cd3f3e4207]:
- File LegacyPasswordGenerator.m — part of check-in [4772cb8670] at 2016-10-08 12:24:32 on branch trunk — Add a license (user: js, size: 2388) [annotate] [blame] [check-ins using]
To Artifact [7a0b6ec41f]:
- File
LegacyPasswordGenerator.m
— part of check-in
[7691951aca]
at
2016-10-08 12:24:43
on branch trunk
— Add new generation algorithm
The scrypt-genpass compatible one is now the legacy algorithm
(activated with -L or --legacy). (user: js, size: 2522) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "LegacyPasswordGenerator.h" @implementation LegacyPasswordGenerator | | < > > > > > > > > > > > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "LegacyPasswordGenerator.h" @implementation LegacyPasswordGenerator @synthesize site = _site, passphrase = _passphrase, output = _output; + (instancetype)generator { return [[[self alloc] init] autorelease]; } - init { self = [super init]; _length = 16; return self; } - (void)setLength: (size_t)length { if (length < 3) @throw [OFInvalidArgumentException exception]; _length = length; } - (size_t)length { return _length; } - (void)derivePassword { OFSHA256Hash *siteHash = [OFSHA256Hash cryptoHash]; [siteHash updateWithBuffer: [_site UTF8String] length: [_site UTF8StringLength]]; |
︙ | ︙ |