2018-07-13 20:35:27 +08:00
|
|
|
---
|
|
|
|
title: "password api"
|
2018-09-25 22:09:28 +08:00
|
|
|
description: "password API provides some basic functions for generating password"
|
2018-07-13 20:35:27 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
# [Available APIs](../) >> password
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
|
|
|
- [Intro](#intro)
|
|
|
|
- [Functions](#functions)
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
|
|
|
## Intro
|
|
|
|
|
|
|
|
This api provides some basic Functions for generating password.
|
|
|
|
|
|
|
|
```vim
|
|
|
|
let s:PW = SpaceVim#api#import('password')
|
|
|
|
let password = s:PW.generate_simple(8)
|
|
|
|
echom password
|
|
|
|
" you should see a string like `GAN0q7aE`
|
|
|
|
```
|
|
|
|
|
|
|
|
## Functions
|
|
|
|
|
|
|
|
| function name | description |
|
|
|
|
| ------------------------ | ---------------------------- |
|
|
|
|
| `generate_simple(len)` | generating simple password |
|
|
|
|
| `generate_strong(len)` | generating strong password |
|
|
|
|
| `generate_paranoid(len)` | generating paranoid password |
|
|
|
|
| `generate_numeric(len)` | generating numeric password |
|
|
|
|
| `generate_phonetic(len)` | generating phonetic password |
|