Add a new pkg/crypto/keys, first cut

- provides three functions
     - GetRandomAlphaNumeric()
     - GetRandomAlphaNumericFull()
     - GetRandomBase64()
     - ValidAccessKey()
This commit is contained in:
Harshavardhana
2015-01-28 11:48:26 -08:00
parent cc54730eee
commit fbafc98edb
2 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package keys
const (
MINIO_ACCESS_ID = 20
MINIO_SECRET_ID = 40
)
func isalnum(c byte) bool {
return '0' <= c && c <= '9' || 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z'
}